1 // normalize-stderr-test "pref: Align\([1-8] bytes\)" -> "pref: $$SOME_ALIGN"
2 #![feature(never_type, rustc_attrs, type_alias_impl_trait, repr_simd)]
7 enum E { Foo, Bar(!, i32, i32) }
//~ ERROR: layout_of
10 struct S { f1: i32, f2: (), f3: i32 }
//~ ERROR: layout_of
12 #[rustc_layout(debug)]
13 union U { f1: (i32, i32), f3: i32 }
//~ ERROR: layout_of
15 #[rustc_layout(debug)]
16 type Test
= Result
<i32, i32>; //~ ERROR: layout_of
18 #[rustc_layout(debug)]
19 type T
= impl std
::fmt
::Debug
; //~ ERROR: layout_of
24 #[rustc_layout(debug)]
25 pub union V
{ //~ ERROR: layout_of
30 #[rustc_layout(debug)]
31 pub union W
{ //~ ERROR: layout_of
36 #[rustc_layout(debug)]
37 pub union Y
{ //~ ERROR: layout_of
42 #[rustc_layout(debug)]
44 union P1 { x: u32 }
//~ ERROR: layout_of
46 #[rustc_layout(debug)]
48 union P2 { x: (u32, u32) }
//~ ERROR: layout_of
51 #[derive(Copy, Clone)]
52 struct F32x4(f32, f32, f32, f32);
54 #[rustc_layout(debug)]
56 union P3 { x: F32x4 }
//~ ERROR: layout_of
58 #[rustc_layout(debug)]
60 union P4 { x: E }
//~ ERROR: layout_of
62 #[rustc_layout(debug)]
64 union P5 { zst: [u16; 0], byte: u8 }
//~ ERROR: layout_of
66 #[rustc_layout(debug)]
67 type X
= std
::mem
::MaybeUninit
<u8>; //~ ERROR: layout_of
69 #[rustc_layout(debug)]
70 const C
: () = (); //~ ERROR: can only be applied to
73 #[rustc_layout(debug)]
74 const C
: () = (); //~ ERROR: can only be applied to
77 #[rustc_layout(debug)]
78 type Impossible
= (str, str); //~ ERROR: cannot be known at compilation time