From ee8d4d1b0546c67198af3cd053d6b7b8b4fd26c3 Mon Sep 17 00:00:00 2001 From: Motoyuki Kimura Date: Fri, 26 Jul 2024 03:30:23 +0900 Subject: [PATCH] chore: fix ci failures (#6725) --- examples/dump.rs | 2 ++ tokio-macros/src/lib.rs | 4 ++++ tokio/src/runtime/tests/queue.rs | 1 + 3 files changed, 7 insertions(+) diff --git a/examples/dump.rs b/examples/dump.rs index c7ece458ff8..6f744713f7c 100644 --- a/examples/dump.rs +++ b/examples/dump.rs @@ -1,3 +1,5 @@ +#![allow(unknown_lints, unexpected_cfgs)] + //! This example demonstrates tokio's experimental task dumping functionality. //! This application deadlocks. Input CTRL+C to display traces of each task, or //! input CTRL+C twice within 1 second to quit. diff --git a/tokio-macros/src/lib.rs b/tokio-macros/src/lib.rs index b5d31c7f6dc..29ea2867cff 100644 --- a/tokio-macros/src/lib.rs +++ b/tokio-macros/src/lib.rs @@ -211,6 +211,7 @@ use proc_macro::TokenStream; /// This option is only compatible with the `current_thread` runtime. /// /// ```no_run +/// # #![allow(unknown_lints, unexpected_cfgs)] /// #[cfg(tokio_unstable)] /// #[tokio::main(flavor = "current_thread", unhandled_panic = "shutdown_runtime")] /// async fn main() { @@ -225,6 +226,7 @@ use proc_macro::TokenStream; /// Equivalent code not using `#[tokio::main]` /// /// ```no_run +/// # #![allow(unknown_lints, unexpected_cfgs)] /// #[cfg(tokio_unstable)] /// fn main() { /// tokio::runtime::Builder::new_current_thread() @@ -478,6 +480,7 @@ pub fn main_rt(args: TokenStream, item: TokenStream) -> TokenStream { /// This option is only compatible with the `current_thread` runtime. /// /// ```no_run +/// # #![allow(unknown_lints, unexpected_cfgs)] /// #[cfg(tokio_unstable)] /// #[tokio::test(flavor = "current_thread", unhandled_panic = "shutdown_runtime")] /// async fn my_test() { @@ -492,6 +495,7 @@ pub fn main_rt(args: TokenStream, item: TokenStream) -> TokenStream { /// Equivalent code not using `#[tokio::test]` /// /// ```no_run +/// # #![allow(unknown_lints, unexpected_cfgs)] /// #[cfg(tokio_unstable)] /// #[test] /// fn my_test() { diff --git a/tokio/src/runtime/tests/queue.rs b/tokio/src/runtime/tests/queue.rs index f463355f0d3..c4d4a1b8642 100644 --- a/tokio/src/runtime/tests/queue.rs +++ b/tokio/src/runtime/tests/queue.rs @@ -273,6 +273,7 @@ fn stress2() { } } +#[allow(dead_code)] struct Runtime; impl Schedule for Runtime {