Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions build.rs
Original file line number Diff line number Diff line change
@@ -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");
}
}
1 change: 0 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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]

Expand Down