diff --git a/build.rs b/build.rs index d0f5b94..1ccbe86 100644 --- a/build.rs +++ b/build.rs @@ -1,11 +1,9 @@ fn main() { println!("cargo:rustc-check-cfg=cfg(doccfg)"); if let Some(true) = version_check::supports_feature("doc_cfg") { - if let Some(true) = version_check::supports_feature("doc_auto_cfg") { - // `doc` is already generated by rustdoc on stable - // `docrs` is generated by docs.rs when building - // This enables local builds to have feature annotations when supported using `doccfg` - println!("cargo:rustc-cfg=doccfg"); - } + // `doc` is already generated by rustdoc on stable + // `docrs` is generated by docs.rs when building + // This enables local builds to have feature annotations when supported using `doccfg` + println!("cargo:rustc-cfg=doccfg"); } } diff --git a/src/lib.rs b/src/lib.rs index 76eb841..13ed71c 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -176,7 +176,6 @@ unsafe { free_in_c(ptr) } // Enable `cargo +nightly doc --all-features` to show all items and their feature requirements. // `doccfg` is set by the `build.rs` when supported (nightly) -#![cfg_attr(doccfg, feature(doc_auto_cfg))] #![cfg_attr(doccfg, feature(doc_cfg))] #![no_std]