Skip to content

Commit 9adfa7b

Browse files
authored
chore: new clippy/rust lints (#2948)
## Motivation clippy is failing with recent Rust toolchain up to 1.77.2. ## Solution Give clippy what it wants.
1 parent 908cc43 commit 9adfa7b

File tree

7 files changed

+8
-0
lines changed

7 files changed

+8
-0
lines changed

tracing-attributes/src/expand.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -795,6 +795,7 @@ impl<'a> VisitMut for IdentAndTypesRenamer<'a> {
795795
}
796796

797797
// A visitor struct that replace an async block by its patched version
798+
#[allow(dead_code)]
798799
struct AsyncTraitBlockReplacer<'a> {
799800
block: &'a Block,
800801
patched_block: Block,

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/dispatch.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -510,6 +510,7 @@ pub(crate) fn get_global() -> &'static Dispatch {
510510
unsafe {
511511
// This is safe given the invariant that setting the global dispatcher
512512
// also sets `GLOBAL_INIT` to `INITIALIZED`.
513+
#[allow(static_mut_refs)]
513514
&GLOBAL_DISPATCH
514515
}
515516
}

tracing-core/src/field.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -966,6 +966,7 @@ mod test {
966966
use crate::metadata::{Kind, Level, Metadata};
967967

968968
// Make sure TEST_CALLSITE_* have non-zero size, so they can't be located at the same address.
969+
#[allow(dead_code)]
969970
struct TestCallsite1(u8);
970971
static TEST_CALLSITE_1: TestCallsite1 = TestCallsite1(0);
971972
static TEST_META_1: Metadata<'static> = metadata! {
@@ -987,6 +988,7 @@ mod test {
987988
}
988989
}
989990

991+
#[allow(dead_code)]
990992
struct TestCallsite2(u8);
991993
static TEST_CALLSITE_2: TestCallsite2 = TestCallsite2(0);
992994
static TEST_META_2: Metadata<'static> = metadata! {

tracing-futures/tests/std_future.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ fn span_on_drop() {
5555
}
5656
}
5757

58+
#[allow(dead_code)]
5859
struct Fut(Option<AssertSpanOnDrop>);
5960

6061
impl Future for Fut {

tracing-subscriber/src/registry/sharded.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -592,6 +592,7 @@ mod tests {
592592
closed: Vec<(&'static str, Weak<()>)>,
593593
}
594594

595+
#[allow(dead_code)]
595596
struct SetRemoved(Arc<()>);
596597

597598
impl<C> Subscribe<C> for CloseSubscriber

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)