]>
git.proxmox.com Git - rustc.git/blob - src/test/ui/dynamically-sized-types/dst-tuple-zst-offsets.rs
3 #![feature(unsized_tuple_coercion)]
5 // Check that we do not change the offsets of ZST fields when unsizing
8 let sized
: &(u8, [(); 13]) = &(123, [(); 13]);
9 let unsize
: &(u8, [()]) = sized
;
10 assert_eq
!(sized
.1.as_ptr(), unsize
.1.as_ptr());
13 fn scalarpair_layout() {
14 let sized
: &(u8, u16, [(); 13]) = &(123, 456, [(); 13]);
15 let unsize
: &(u8, u16, [()]) = sized
;
16 assert_eq
!(sized
.2.as_ptr(), unsize
.2.as_ptr());