rust/tests/ui/consts/extra-const-ub/issue-101034.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

18 lines
220 B
Rust
Raw Normal View History

2022-08-26 10:04:13 -05:00
// 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;
}