chore: Do not show "Available on non-loom only." doc label (#7977)

* chore: Do not show "Available on non-loom only." doc label

Closes #7976

Uses the unstable #[doc(cfg()]. https://github.com/rust-lang/rust/issues/43781

* Use build.rs to detect nightly builds

* Use `docsrs` instead of `nightly`. Drop build.rs

* Use doc(auto_cfg(hide(config_name)))

* Use same nightly on CirrusCI (FreeBSD) as on Github Actions CI
This commit is contained in:
Martin Grigorov
2026-03-18 15:14:02 +02:00
committed by GitHub
parent dd1196d369
commit 66c786540e
2 changed files with 4 additions and 1 deletions
+1 -1
View File
@@ -4,7 +4,7 @@ freebsd_instance:
image_family: freebsd-14-3
env:
RUST_STABLE: stable
RUST_NIGHTLY: nightly-2025-01-25
RUST_NIGHTLY: nightly-2025-10-12
RUSTFLAGS: -D warnings
# This excludes unstable features like io_uring, which require '--cfg tokio_unstable'.
TOKIO_STABLE_FEATURES: full,test-util
+3
View File
@@ -15,6 +15,9 @@
no_crate_inject,
attr(deny(warnings, rust_2018_idioms), allow(dead_code, unused_variables))
))]
// loom is an internal implementation detail.
// Do not show "Available on non-loom only" label
#![cfg_attr(docsrs, doc(auto_cfg(hide(loom))))]
#![cfg_attr(docsrs, feature(doc_cfg))]
#![cfg_attr(docsrs, allow(unused_attributes))]
#![cfg_attr(loom, allow(dead_code, unreachable_pub))]