1 // This assumes the packed and non-packed structs are different sizes.
3 // the error points to the start of the file, not the line with the
6 // error-pattern: cannot transmute between types of different sizes, or dependently-sized types
22 let foo = Foo { bar: [1u8, 2, 3, 4, 5], baz: 10i32 };
24 let oof: Oof<[u8; 5], i32> = mem::transmute(foo);
25 println!("{:?} {:?}", &oof.rab[..], oof.zab);