Skip to content

Commit e5b2603

Browse files
committed
fix: new clippy/rust lints
1 parent 36bf063 commit e5b2603

File tree

4 files changed

+5
-0
lines changed

4 files changed

+5
-0
lines changed

tracing-attributes/tests/instrument.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ fn fields() {
100100

101101
#[test]
102102
fn skip() {
103+
#[allow(dead_code)]
103104
struct UnDebug(pub u32);
104105

105106
#[instrument(target = "my_target", level = "debug", skip(_arg2, _arg3))]

tracing-core/src/dispatcher.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -455,6 +455,7 @@ fn get_global() -> &'static Dispatch {
455455
unsafe {
456456
// This is safe given the invariant that setting the global dispatcher
457457
// also sets `GLOBAL_INIT` to `INITIALIZED`.
458+
#[allow(static_mut_refs)]
458459
&GLOBAL_DISPATCH
459460
}
460461
}

tracing-core/src/field.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1090,6 +1090,7 @@ mod test {
10901090
use crate::stdlib::{borrow::ToOwned, string::String};
10911091

10921092
// Make sure TEST_CALLSITE_* have non-zero size, so they can't be located at the same address.
1093+
#[allow(dead_code)]
10931094
struct TestCallsite1(u8);
10941095
static TEST_CALLSITE_1: TestCallsite1 = TestCallsite1(0);
10951096
static TEST_META_1: Metadata<'static> = metadata! {
@@ -1111,6 +1112,7 @@ mod test {
11111112
}
11121113
}
11131114

1115+
#[allow(dead_code)]
11141116
struct TestCallsite2(u8);
11151117
static TEST_CALLSITE_2: TestCallsite2 = TestCallsite2(0);
11161118
static TEST_META_2: Metadata<'static> = metadata! {

tracing/tests/instrument.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ fn span_on_drop() {
2121
}
2222
}
2323

24+
#[allow(dead_code)]
2425
struct Fut(Option<AssertSpanOnDrop>);
2526

2627
impl Future for Fut {

0 commit comments

Comments
 (0)