diff --git a/benches/sync_mpsc.rs b/benches/sync_mpsc.rs index 117b3babd..1a3f37cab 100644 --- a/benches/sync_mpsc.rs +++ b/benches/sync_mpsc.rs @@ -4,7 +4,7 @@ use criterion::measurement::WallTime; use criterion::{black_box, criterion_group, criterion_main, BenchmarkGroup, Criterion}; #[derive(Debug, Copy, Clone)] -struct Medium([usize; 64]); +struct Medium(#[allow(dead_code)] [usize; 64]); impl Default for Medium { fn default() -> Self { Medium([0; 64]) @@ -12,7 +12,7 @@ impl Default for Medium { } #[derive(Debug, Copy, Clone)] -struct Large([Medium; 64]); +struct Large(#[allow(dead_code)] [Medium; 64]); impl Default for Large { fn default() -> Self { Large([Medium::default(); 64]) diff --git a/tokio/src/sync/tests/notify.rs b/tokio/src/sync/tests/notify.rs index 323b5c65a..83182464c 100644 --- a/tokio/src/sync/tests/notify.rs +++ b/tokio/src/sync/tests/notify.rs @@ -52,7 +52,7 @@ fn notify_waiters_handles_panicking_waker() { let notify = Arc::new(Notify::new()); - struct PanickingWaker(Arc); + struct PanickingWaker(#[allow(dead_code)] Arc); impl ArcWake for PanickingWaker { fn wake_by_ref(_arc_self: &Arc) { diff --git a/tokio/src/sync/tests/semaphore_batch.rs b/tokio/src/sync/tests/semaphore_batch.rs index 09610ce71..fb5e8fdd6 100644 --- a/tokio/src/sync/tests/semaphore_batch.rs +++ b/tokio/src/sync/tests/semaphore_batch.rs @@ -268,7 +268,7 @@ fn release_permits_at_drop() { let sem = Arc::new(Semaphore::new(1)); - struct ReleaseOnDrop(Option); + struct ReleaseOnDrop(#[allow(dead_code)] Option); impl ArcWake for ReleaseOnDrop { fn wake_by_ref(_arc_self: &Arc) {} diff --git a/tokio/src/util/markers.rs b/tokio/src/util/markers.rs index 7031fb6bc..c16ebdf0b 100644 --- a/tokio/src/util/markers.rs +++ b/tokio/src/util/markers.rs @@ -1,8 +1,8 @@ /// Marker for types that are `Sync` but not `Send` -pub(crate) struct SyncNotSend(*mut ()); +pub(crate) struct SyncNotSend(#[allow(dead_code)] *mut ()); unsafe impl Sync for SyncNotSend {} cfg_rt! { - pub(crate) struct NotSendOrSync(*mut ()); + pub(crate) struct NotSendOrSync(#[allow(dead_code)] *mut ()); }