From 780ef78ea44329685854985cf128e855eeeec4be Mon Sep 17 00:00:00 2001 From: DerZade Date: Tue, 5 Sep 2023 20:56:32 +0200 Subject: [PATCH] chore: use doc_auto_cfg feature for docs.rs builds --- Cargo.toml | 1 + src/lib.rs | 1 + 2 files changed, 2 insertions(+) diff --git a/Cargo.toml b/Cargo.toml index 2aef39f..d644ebc 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -29,3 +29,4 @@ version = "0.1" [package.metadata.docs.rs] all-features = true +rustdoc-args = ["--cfg", "docsrs"] diff --git a/src/lib.rs b/src/lib.rs index 8eb14fc..273f238 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -246,6 +246,7 @@ appropriate `repr` attribute: #![allow(unknown_lints)] #![warn(clippy::all)] #![cfg_attr(not(feature = "std"), no_std)] +#![cfg_attr(docsrs, feature(doc_auto_cfg))] use core::fmt::{Debug, Formatter, Result}; use core::ops::*;