Skip to content

Commit 92cc57b

Browse files
committed
Remove no-longer-needed allow(dead_code) from the tests
`repr(transparent)` now silences the lint.
1 parent fb7762b commit 92cc57b

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

tests/ui/consts/transmute-const.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
use std::mem;
44

55
#[repr(transparent)]
6-
struct Foo(#[allow(dead_code)] u32);
6+
struct Foo(u32);
77

88
const TRANSMUTED_U32: u32 = unsafe { mem::transmute(Foo(3)) };
99

tests/ui/layout/unsafe-cell-hides-niche.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ use std::sync::{Mutex, RwLock};
1717
struct Wrapper<T>(#[allow(dead_code)] T);
1818

1919
#[repr(transparent)]
20-
struct Transparent<T>(#[allow(dead_code)] T);
20+
struct Transparent<T>(T);
2121

2222
struct NoNiche<T>(UnsafeCell<T>);
2323

tests/ui/packed/packed-struct-drop-aligned.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ impl<'a> Drop for Aligned<'a> {
2424
}
2525

2626
#[repr(transparent)]
27-
struct NotCopy(#[allow(dead_code)] u8);
27+
struct NotCopy(u8);
2828

2929
#[repr(packed)]
3030
struct Packed<'a>(NotCopy, Aligned<'a>);

0 commit comments

Comments
 (0)