]> git.lizzy.rs Git - rust.git/blob - src/test/mir-opt/packed-struct-drop-aligned.rs
Rollup merge of #100367 - fmease:fix-100365, r=compiler-errors
[rust.git] / src / test / mir-opt / packed-struct-drop-aligned.rs
1 // ignore-wasm32-bare compiled with panic=abort by default
2
3 // EMIT_MIR_FOR_EACH_BIT_WIDTH
4 // EMIT_MIR packed_struct_drop_aligned.main.SimplifyCfg-elaborate-drops.after.mir
5 fn main() {
6     let mut x = Packed(Aligned(Droppy(0)));
7     x.0 = Aligned(Droppy(0));
8 }
9
10 struct Aligned(Droppy);
11 #[repr(packed)]
12 struct Packed(Aligned);
13
14 struct Droppy(usize);
15 impl Drop for Droppy {
16     fn drop(&mut self) {}
17 }