diff --git a/tracing-attributes/tests/async_fn.rs b/tracing-attributes/tests/async_fn.rs index 31d705c6b..437adfa7e 100644 --- a/tracing-attributes/tests/async_fn.rs +++ b/tracing-attributes/tests/async_fn.rs @@ -30,14 +30,17 @@ async fn test_ret_impl_trait_err(n: i32) -> Result, &' } #[instrument] +#[allow(dead_code)] async fn test_async_fn_empty() {} #[instrument] +#[allow(dead_code)] async unsafe fn test_async_unsafe_fn_empty() {} // Reproduces a compile error when an instrumented function body contains inner // attributes (https://github.com/tokio-rs/tracing/issues/2294). #[deny(unused_variables)] +#[allow(dead_code, clippy::mixed_attributes_style)] #[instrument] async fn repro_async_2294() { #![allow(unused_variables)] @@ -50,6 +53,7 @@ async fn repro_async_2294() { // with the rustfmt-generated formatting, the lint will not be triggered! #[rustfmt::skip] #[deny(clippy::suspicious_else_formatting)] +#[allow(dead_code)] async fn repro_1613(var: bool) { println!( "{}", @@ -61,6 +65,7 @@ async fn repro_1613(var: bool) { // and https://github.com/rust-lang/rust-clippy/issues/7760 #[instrument] #[deny(clippy::suspicious_else_formatting)] +#[allow(dead_code)] async fn repro_1613_2() { // hello world // else diff --git a/tracing-attributes/tests/err.rs b/tracing-attributes/tests/err.rs index 3ff9f056a..c55565b1c 100644 --- a/tracing-attributes/tests/err.rs +++ b/tracing-attributes/tests/err.rs @@ -15,6 +15,7 @@ fn err() -> Result { } #[instrument(err)] +#[allow(dead_code)] fn err_suspicious_else() -> Result { {} u8::try_from(1234) diff --git a/tracing-attributes/tests/instrument.rs b/tracing-attributes/tests/instrument.rs index 2897316be..209afb23c 100644 --- a/tracing-attributes/tests/instrument.rs +++ b/tracing-attributes/tests/instrument.rs @@ -6,6 +6,7 @@ use tracing_mock::*; // Reproduces a compile error when an instrumented function body contains inner // attributes (https://github.com/tokio-rs/tracing/issues/2294). #[deny(unused_variables)] +#[allow(dead_code, clippy::mixed_attributes_style)] #[instrument] fn repro_2294() { #![allow(unused_variables)]