mirror of
https://github.com/tokio-rs/tracing.git
synced 2026-03-23 16:10:18 +00:00
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.
This commit is contained in:
committed by
GitHub
parent
908cc432a5
commit
9adfa7bebd
@@ -795,6 +795,7 @@ impl<'a> VisitMut for IdentAndTypesRenamer<'a> {
|
||||
}
|
||||
|
||||
// A visitor struct that replace an async block by its patched version
|
||||
#[allow(dead_code)]
|
||||
struct AsyncTraitBlockReplacer<'a> {
|
||||
block: &'a Block,
|
||||
patched_block: Block,
|
||||
|
||||
@@ -100,6 +100,7 @@ fn fields() {
|
||||
|
||||
#[test]
|
||||
fn skip() {
|
||||
#[allow(dead_code)]
|
||||
struct UnDebug(pub u32);
|
||||
|
||||
#[instrument(target = "my_target", level = "debug", skip(_arg2, _arg3))]
|
||||
|
||||
@@ -510,6 +510,7 @@ pub(crate) fn get_global() -> &'static Dispatch {
|
||||
unsafe {
|
||||
// This is safe given the invariant that setting the global dispatcher
|
||||
// also sets `GLOBAL_INIT` to `INITIALIZED`.
|
||||
#[allow(static_mut_refs)]
|
||||
&GLOBAL_DISPATCH
|
||||
}
|
||||
}
|
||||
|
||||
@@ -966,6 +966,7 @@ mod test {
|
||||
use crate::metadata::{Kind, Level, Metadata};
|
||||
|
||||
// Make sure TEST_CALLSITE_* have non-zero size, so they can't be located at the same address.
|
||||
#[allow(dead_code)]
|
||||
struct TestCallsite1(u8);
|
||||
static TEST_CALLSITE_1: TestCallsite1 = TestCallsite1(0);
|
||||
static TEST_META_1: Metadata<'static> = metadata! {
|
||||
@@ -987,6 +988,7 @@ mod test {
|
||||
}
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
struct TestCallsite2(u8);
|
||||
static TEST_CALLSITE_2: TestCallsite2 = TestCallsite2(0);
|
||||
static TEST_META_2: Metadata<'static> = metadata! {
|
||||
|
||||
@@ -55,6 +55,7 @@ fn span_on_drop() {
|
||||
}
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
struct Fut(Option<AssertSpanOnDrop>);
|
||||
|
||||
impl Future for Fut {
|
||||
|
||||
@@ -592,6 +592,7 @@ mod tests {
|
||||
closed: Vec<(&'static str, Weak<()>)>,
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
struct SetRemoved(Arc<()>);
|
||||
|
||||
impl<C> Subscribe<C> for CloseSubscriber
|
||||
|
||||
@@ -21,6 +21,7 @@ fn span_on_drop() {
|
||||
}
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
struct Fut(Option<AssertSpanOnDrop>);
|
||||
|
||||
impl Future for Fut {
|
||||
|
||||
Reference in New Issue
Block a user