diff options
Diffstat (limited to '')
-rw-r--r-- | tests/ui/mir/addrof_alignment.rs | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/tests/ui/mir/addrof_alignment.rs b/tests/ui/mir/addrof_alignment.rs deleted file mode 100644 index 892638bfb..000000000 --- a/tests/ui/mir/addrof_alignment.rs +++ /dev/null @@ -1,15 +0,0 @@ -// run-pass -// ignore-wasm32-bare: No panic messages -// compile-flags: -C debug-assertions - -struct Misalignment { - a: u32, -} - -fn main() { - let items: [Misalignment; 2] = [Misalignment { a: 0 }, Misalignment { a: 1 }]; - unsafe { - let ptr: *const Misalignment = items.as_ptr().cast::<u8>().add(1).cast::<Misalignment>(); - let _ptr = core::ptr::addr_of!((*ptr).a); - } -} |