]> git.lizzy.rs Git - rust.git/blob - tests/mir-opt/packed_struct_drop_aligned.rs
Rollup merge of #106709 - khuey:disable_split_dwarf_inlining_by_default, r=davidtwco
[rust.git] / tests / mir-opt / packed_struct_drop_aligned.rs
1 // ignore-wasm32-bare compiled with panic=abort by default
2
3
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 }