summaryrefslogtreecommitdiffstats
path: root/src/test/ui/consts/extra-const-ub/issue-101034.rs
blob: e0de705c488460b22da6d7462ff839ea2b6055be (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;
}