]> git.lizzy.rs Git - rust.git/blob - tests/mir-opt/packed_struct_drop_aligned.rs
Rollup merge of #104965 - zacklukem:p-option-as_ref-docs, r=scottmcm
[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 }