From 66c786540ec0bc60f506945dafd7cc7cad6b01a0 Mon Sep 17 00:00:00 2001 From: Martin Grigorov Date: Wed, 18 Mar 2026 15:14:02 +0200 Subject: [PATCH] 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 --- .cirrus.yml | 2 +- tokio/src/lib.rs | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.cirrus.yml b/.cirrus.yml index 2e364028d..f18d58354 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -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 diff --git a/tokio/src/lib.rs b/tokio/src/lib.rs index d1e9ba093..7da7e21fd 100644 --- a/tokio/src/lib.rs +++ b/tokio/src/lib.rs @@ -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))]