mirror of
https://github.com/rust-lang/rust.git
synced 2025-01-19 03:03:21 +00:00
Remove no-longer-needed allow(dead_code)
from the tests
`repr(transparent)` now silences the lint.
This commit is contained in:
parent
fb7762b1c5
commit
92cc57bafc
@ -3,7 +3,7 @@
|
|||||||
use std::mem;
|
use std::mem;
|
||||||
|
|
||||||
#[repr(transparent)]
|
#[repr(transparent)]
|
||||||
struct Foo(#[allow(dead_code)] u32);
|
struct Foo(u32);
|
||||||
|
|
||||||
const TRANSMUTED_U32: u32 = unsafe { mem::transmute(Foo(3)) };
|
const TRANSMUTED_U32: u32 = unsafe { mem::transmute(Foo(3)) };
|
||||||
|
|
||||||
|
@ -17,7 +17,7 @@ use std::sync::{Mutex, RwLock};
|
|||||||
struct Wrapper<T>(#[allow(dead_code)] T);
|
struct Wrapper<T>(#[allow(dead_code)] T);
|
||||||
|
|
||||||
#[repr(transparent)]
|
#[repr(transparent)]
|
||||||
struct Transparent<T>(#[allow(dead_code)] T);
|
struct Transparent<T>(T);
|
||||||
|
|
||||||
struct NoNiche<T>(UnsafeCell<T>);
|
struct NoNiche<T>(UnsafeCell<T>);
|
||||||
|
|
||||||
|
@ -24,7 +24,7 @@ impl<'a> Drop for Aligned<'a> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[repr(transparent)]
|
#[repr(transparent)]
|
||||||
struct NotCopy(#[allow(dead_code)] u8);
|
struct NotCopy(u8);
|
||||||
|
|
||||||
#[repr(packed)]
|
#[repr(packed)]
|
||||||
struct Packed<'a>(NotCopy, Aligned<'a>);
|
struct Packed<'a>(NotCopy, Aligned<'a>);
|
||||||
|
Loading…
Reference in New Issue
Block a user