// normalize-stderr-test "\d+ bits" -> "N bits" trait Bar { type Bar; } struct ArrayPeano { data: T::Bar, } fn foo(a: &ArrayPeano) -> &[T] where T: Bar { unsafe { std::mem::transmute(a) } //~ ERROR cannot transmute between types of different sizes } impl Bar for () { type Bar = (); } fn main() { let x: ArrayPeano<()> = ArrayPeano { data: () }; foo(&x); }