Skip to content

Commit e601fe2

Browse files
committed
[allow(dead_code)] in test
1 parent 0928c37 commit e601fe2

File tree

3 files changed

+7
-0
lines changed

3 files changed

+7
-0
lines changed

tracing-attributes/tests/async_fn.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,17 @@ async fn test_ret_impl_trait_err(n: i32) -> Result<impl Iterator<Item = i32>, &'
3030
}
3131

3232
#[instrument]
33+
#[allow(dead_code)]
3334
async fn test_async_fn_empty() {}
3435

3536
#[instrument]
37+
#[allow(dead_code)]
3638
async unsafe fn test_async_unsafe_fn_empty() {}
3739

3840
// Reproduces a compile error when an instrumented function body contains inner
3941
// attributes (https://github.com/tokio-rs/tracing/issues/2294).
4042
#[deny(unused_variables)]
43+
#[allow(dead_code, clippy::mixed_attributes_style)]
4144
#[instrument]
4245
async fn repro_async_2294() {
4346
#![allow(unused_variables)]
@@ -50,6 +53,7 @@ async fn repro_async_2294() {
5053
// with the rustfmt-generated formatting, the lint will not be triggered!
5154
#[rustfmt::skip]
5255
#[deny(clippy::suspicious_else_formatting)]
56+
#[allow(dead_code)]
5357
async fn repro_1613(var: bool) {
5458
println!(
5559
"{}",
@@ -61,6 +65,7 @@ async fn repro_1613(var: bool) {
6165
// and https://github.com/rust-lang/rust-clippy/issues/7760
6266
#[instrument]
6367
#[deny(clippy::suspicious_else_formatting)]
68+
#[allow(dead_code)]
6469
async fn repro_1613_2() {
6570
// hello world
6671
// else

tracing-attributes/tests/err.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ fn err() -> Result<u8, TryFromIntError> {
1515
}
1616

1717
#[instrument(err)]
18+
#[allow(dead_code)]
1819
fn err_suspicious_else() -> Result<u8, TryFromIntError> {
1920
{}
2021
u8::try_from(1234)

tracing-attributes/tests/instrument.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ use tracing_mock::*;
66
// Reproduces a compile error when an instrumented function body contains inner
77
// attributes (https://github.com/tokio-rs/tracing/issues/2294).
88
#[deny(unused_variables)]
9+
#[allow(dead_code, clippy::mixed_attributes_style)]
910
#[instrument]
1011
fn repro_2294() {
1112
#![allow(unused_variables)]

0 commit comments

Comments
 (0)