summaryrefslogtreecommitdiffstats
path: root/tests/mir-opt/packed_struct_drop_aligned.rs
blob: 079c4e68f50ca43285271563ab6269f88d91e7de (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// skip-filecheck
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY


// EMIT_MIR packed_struct_drop_aligned.main.SimplifyCfg-elaborate-drops.after.mir
fn main() {
    let mut x = Packed(Aligned(Droppy(0)));
    x.0 = Aligned(Droppy(0));
}

struct Aligned(Droppy);
#[repr(packed)]
struct Packed(Aligned);

struct Droppy(usize);
impl Drop for Droppy {
    fn drop(&mut self) {}
}