]> git.lizzy.rs Git - rust.git/blob - src/test/mir-opt/const_allocation3.rs
Add #[const_trait] where needed in tests.
[rust.git] / src / test / mir-opt / const_allocation3.rs
1 // ignore-endian-big
2 // EMIT_MIR_FOR_EACH_BIT_WIDTH
3 // EMIT_MIR const_allocation3.main.ConstProp.after.mir
4 fn main() {
5     FOO;
6 }
7
8 #[repr(packed)]
9 struct Packed {
10     a: [u8; 28],
11     b: &'static i32,
12     c: u32,
13     d: [u8; 102],
14     e: fn(),
15     f: u16,
16     g: &'static u8,
17     h: [u8; 20],
18 }
19
20 static FOO: &Packed = &Packed {
21     a: [0xAB; 28],
22     b: &42,
23     c: 0xABCD_EF01,
24     d: [0; 102],
25     e: main,
26     f: 0,
27     g: &[0; 100][99],
28     h: [0; 20],
29 };