]> git.lizzy.rs Git - rust.git/blob - src/test/mir-opt/packed_struct_drop_aligned.rs
Add #[const_trait] where needed in tests.
[rust.git] / src / test / 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 }