mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-03 12:13:43 +00:00
18 lines
222 B
Rust
18 lines
222 B
Rust
//@ check-pass
|
|
//@ compile-flags: -Zextra-const-ub-checks
|
|
|
|
#[repr(packed)]
|
|
pub struct Foo {
|
|
bar: u8,
|
|
baa: [u32; 1],
|
|
}
|
|
|
|
const FOOMP: Foo = Foo {
|
|
bar: 0,
|
|
baa: [69; 1],
|
|
};
|
|
|
|
fn main() {
|
|
let _val = FOOMP;
|
|
}
|