diff --git a/crossbeam-channel/benchmarks/message.rs b/crossbeam-channel/benchmarks/message.rs index f8a921ec7..55c1697a2 100644 --- a/crossbeam-channel/benchmarks/message.rs +++ b/crossbeam-channel/benchmarks/message.rs @@ -3,7 +3,7 @@ use std::fmt; const LEN: usize = 1; #[derive(Clone, Copy)] -pub struct Message(pub [usize; LEN]); +pub struct Message(#[allow(dead_code)] [usize; LEN]); impl fmt::Debug for Message { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { diff --git a/crossbeam-epoch/src/collector.rs b/crossbeam-epoch/src/collector.rs index 5b0851184..efcf0fe8d 100644 --- a/crossbeam-epoch/src/collector.rs +++ b/crossbeam-epoch/src/collector.rs @@ -286,7 +286,7 @@ mod tests { const COUNT: usize = 100_000; static DROPS: AtomicUsize = AtomicUsize::new(0); - struct Elem(i32); + struct Elem(#[allow(dead_code)] i32); impl Drop for Elem { fn drop(&mut self) { @@ -350,7 +350,7 @@ mod tests { const COUNT: usize = 700; static DROPS: AtomicUsize = AtomicUsize::new(0); - struct Elem(i32); + struct Elem(#[allow(dead_code)] i32); impl Drop for Elem { fn drop(&mut self) { @@ -427,7 +427,7 @@ mod tests { const COUNT: usize = 100_000; static DROPS: AtomicUsize = AtomicUsize::new(0); - struct Elem(i32); + struct Elem(#[allow(dead_code)] i32); impl Drop for Elem { fn drop(&mut self) { diff --git a/crossbeam-utils/tests/atomic_cell.rs b/crossbeam-utils/tests/atomic_cell.rs index 7a2689d99..9fe69328d 100644 --- a/crossbeam-utils/tests/atomic_cell.rs +++ b/crossbeam-utils/tests/atomic_cell.rs @@ -6,11 +6,11 @@ use crossbeam_utils::atomic::AtomicCell; #[test] fn is_lock_free() { - struct UsizeWrap(usize); - struct U8Wrap(bool); - struct I16Wrap(i16); + struct UsizeWrap(#[allow(dead_code)] usize); + struct U8Wrap(#[allow(dead_code)] bool); + struct I16Wrap(#[allow(dead_code)] i16); #[repr(align(8))] - struct U64Align8(u64); + struct U64Align8(#[allow(dead_code)] u64); assert!(AtomicCell::::is_lock_free()); assert!(AtomicCell::::is_lock_free());