From 9cb495cdb841bb328cf188be030b8aa3adc31a8f Mon Sep 17 00:00:00 2001 From: Alice Ryhl Date: Tue, 26 Oct 2021 14:08:11 +0200 Subject: [PATCH] tokio: upgrade to new nightly for CI (#4193) --- .github/workflows/ci.yml | 2 +- .github/workflows/loom.yml | 1 - tokio/src/lib.rs | 4 ++++ tokio/src/macros/cfg.rs | 1 + tokio/src/runtime/handle.rs | 10 ++++++++++ 5 files changed, 16 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c28845450..05f6e87f3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,7 +9,7 @@ name: CI env: RUSTFLAGS: -Dwarnings RUST_BACKTRACE: 1 - nightly: nightly-2021-07-09 + nightly: nightly-2021-10-25 minrust: 1.45.2 jobs: diff --git a/.github/workflows/loom.yml b/.github/workflows/loom.yml index 9b26ff5d0..fde9f1114 100644 --- a/.github/workflows/loom.yml +++ b/.github/workflows/loom.yml @@ -10,7 +10,6 @@ name: Loom env: RUSTFLAGS: -Dwarnings RUST_BACKTRACE: 1 - nightly: nightly-2021-07-09 jobs: loom: diff --git a/tokio/src/lib.rs b/tokio/src/lib.rs index 7064c741e..30eeb83b4 100644 --- a/tokio/src/lib.rs +++ b/tokio/src/lib.rs @@ -16,6 +16,10 @@ attr(deny(warnings, rust_2018_idioms), allow(dead_code, unused_variables)) ))] #![cfg_attr(docsrs, feature(doc_cfg))] +#![cfg_attr(docsrs, feature(doc_cfg_hide))] +#![cfg_attr(docsrs, doc(cfg_hide(docsrs)))] +#![cfg_attr(docsrs, doc(cfg_hide(loom)))] +#![cfg_attr(docsrs, doc(cfg_hide(not(loom))))] #![cfg_attr(docsrs, allow(unused_attributes))] //! A runtime for writing reliable network applications without compromising speed. diff --git a/tokio/src/macros/cfg.rs b/tokio/src/macros/cfg.rs index 3afc04023..606bce768 100644 --- a/tokio/src/macros/cfg.rs +++ b/tokio/src/macros/cfg.rs @@ -99,6 +99,7 @@ macro_rules! cfg_io_driver_impl { feature = "process", all(unix, feature = "signal"), ))] + #[cfg_attr(docsrs, doc(cfg(all())))] $item )* } diff --git a/tokio/src/runtime/handle.rs b/tokio/src/runtime/handle.rs index 1eeef6575..3fa012eb0 100644 --- a/tokio/src/runtime/handle.rs +++ b/tokio/src/runtime/handle.rs @@ -18,15 +18,25 @@ pub struct Handle { pub(super) spawner: Spawner, /// Handles to the I/O drivers + #[cfg_attr( + not(any(feature = "net", feature = "process", all(unix, feature = "signal"))), + allow(dead_code) + )] pub(super) io_handle: driver::IoHandle, /// Handles to the signal drivers + #[cfg_attr( + not(any(feature = "signal", all(unix, feature = "process"))), + allow(dead_code) + )] pub(super) signal_handle: driver::SignalHandle, /// Handles to the time drivers + #[cfg_attr(not(feature = "time"), allow(dead_code))] pub(super) time_handle: driver::TimeHandle, /// Source of `Instant::now()` + #[cfg_attr(not(all(feature = "time", feature = "test-util")), allow(dead_code))] pub(super) clock: driver::Clock, /// Blocking pool spawner