diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:19:41 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:19:41 +0000 |
commit | 4f9fe856a25ab29345b90e7725509e9ee38a37be (patch) | |
tree | e4ffd8a9374cae7b21f7cbfb352927e0e074aff6 /tests/ui/packed/issue-27060-rpass.rs | |
parent | Adding upstream version 1.68.2+dfsg1. (diff) | |
download | rustc-upstream/1.69.0+dfsg1.tar.xz rustc-upstream/1.69.0+dfsg1.zip |
Adding upstream version 1.69.0+dfsg1.upstream/1.69.0+dfsg1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | tests/ui/packed/issue-27060-rpass.rs | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/tests/ui/packed/issue-27060-rpass.rs b/tests/ui/packed/issue-27060-rpass.rs deleted file mode 100644 index d9159f666..000000000 --- a/tests/ui/packed/issue-27060-rpass.rs +++ /dev/null @@ -1,23 +0,0 @@ -// run-pass -#![allow(dead_code)] -#[repr(packed)] -pub struct Good { - data: &'static u32, - data2: [&'static u32; 2], - aligned: [u8; 32], -} - -// kill this test when that turns to a hard error -#[allow(unaligned_references)] -fn main() { - let good = Good { data: &0, data2: [&0, &0], aligned: [0; 32] }; - - let _ = &good.data; // ok - let _ = &good.data2[0]; // ok - - let _ = &good.data; - let _ = &good.data2[0]; - let _ = &*good.data; // ok, behind a pointer - let _ = &good.aligned; // ok, has align 1 - let _ = &good.aligned[2]; // ok, has align 1 -} |