]> git.lizzy.rs Git - rust.git/blob - src/test/ui/layout/debug.rs
Rollup merge of #96647 - Enselic:fix-hrtb-for-wherepredicate, r=CraftSpider
[rust.git] / src / test / ui / layout / debug.rs
1 // normalize-stderr-test "pref: Align\([1-8] bytes\)" -> "pref: $$PREF_ALIGN"
2 #![feature(never_type, rustc_attrs, type_alias_impl_trait)]
3 #![crate_type = "lib"]
4
5 #[rustc_layout(debug)]
6 enum E { Foo, Bar(!, i32, i32) } //~ ERROR: layout_of
7
8 #[rustc_layout(debug)]
9 struct S { f1: i32, f2: (), f3: i32 } //~ ERROR: layout_of
10
11 #[rustc_layout(debug)]
12 union U { f1: (i32, i32), f3: i32 } //~ ERROR: layout_of
13
14 #[rustc_layout(debug)]
15 type Test = Result<i32, i32>; //~ ERROR: layout_of
16
17 #[rustc_layout(debug)]
18 type T = impl std::fmt::Debug; //~ ERROR: layout_of
19
20 fn f() -> T {
21     0i32
22 }