1 #![feature(rustc_attrs)]
3 // Show that `homogeneous_aggregate` code ignores zero-length C
4 // arrays. This matches the recent C standard, though not the
5 // behavior of all older compilers, which sometimes consider `T[0]` to
6 // be a "flexible array member" (see discussion on #56877 for
21 #[rustc_layout(homogeneous_aggregate)]
22 pub type TestMiddle = Middle;
23 //~^ ERROR homogeneous_aggregate: Ok(Homogeneous
32 #[rustc_layout(homogeneous_aggregate)]
33 pub type TestFinal = Final;
34 //~^ ERROR homogeneous_aggregate: Ok(Homogeneous