about summary refs log tree commit diff
path: root/tests/ui/consts/extra-const-ub/issue-101034.rs
blob: cb0a0fb0d5b515b3a6442de5cf8a543671ebd004 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
//@ 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;
}