about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJake Goulding <jake.goulding@gmail.com>2024-01-18 13:14:35 -0500
committerJake Goulding <jake.goulding@gmail.com>2024-01-18 13:16:09 -0500
commit92cc57bafcea1380e2a8f7a6a732302b04c28c5f (patch)
tree6f172e595300748111554b9b3432b0eee35db1be
parentfb7762b1c51d67a56324b92fd79c85b33d5d1d3b (diff)
downloadrust-92cc57bafcea1380e2a8f7a6a732302b04c28c5f.tar.gz
rust-92cc57bafcea1380e2a8f7a6a732302b04c28c5f.zip
Remove no-longer-needed `allow(dead_code)` from the tests
`repr(transparent)` now silences the lint.
-rw-r--r--tests/ui/consts/transmute-const.rs2
-rw-r--r--tests/ui/layout/unsafe-cell-hides-niche.rs2
-rw-r--r--tests/ui/packed/packed-struct-drop-aligned.rs2
3 files changed, 3 insertions, 3 deletions
diff --git a/tests/ui/consts/transmute-const.rs b/tests/ui/consts/transmute-const.rs
index 65e5700d083..5044d99ec51 100644
--- a/tests/ui/consts/transmute-const.rs
+++ b/tests/ui/consts/transmute-const.rs
@@ -3,7 +3,7 @@
 use std::mem;
 
 #[repr(transparent)]
-struct Foo(#[allow(dead_code)] u32);
+struct Foo(u32);
 
 const TRANSMUTED_U32: u32 = unsafe { mem::transmute(Foo(3)) };
 
diff --git a/tests/ui/layout/unsafe-cell-hides-niche.rs b/tests/ui/layout/unsafe-cell-hides-niche.rs
index 8d6cea10933..e87c402f8f9 100644
--- a/tests/ui/layout/unsafe-cell-hides-niche.rs
+++ b/tests/ui/layout/unsafe-cell-hides-niche.rs
@@ -17,7 +17,7 @@ use std::sync::{Mutex, RwLock};
 struct Wrapper<T>(#[allow(dead_code)] T);
 
 #[repr(transparent)]
-struct Transparent<T>(#[allow(dead_code)] T);
+struct Transparent<T>(T);
 
 struct NoNiche<T>(UnsafeCell<T>);
 
diff --git a/tests/ui/packed/packed-struct-drop-aligned.rs b/tests/ui/packed/packed-struct-drop-aligned.rs
index 6c2907c86e9..ddfc86f74d3 100644
--- a/tests/ui/packed/packed-struct-drop-aligned.rs
+++ b/tests/ui/packed/packed-struct-drop-aligned.rs
@@ -24,7 +24,7 @@ impl<'a> Drop for Aligned<'a> {
 }
 
 #[repr(transparent)]
-struct NotCopy(#[allow(dead_code)] u8);
+struct NotCopy(u8);
 
 #[repr(packed)]
 struct Packed<'a>(NotCopy, Aligned<'a>);