rust/tests/mir-opt/packed_struct_drop_aligned.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

18 lines
347 B
Rust
Raw Normal View History

// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
2020-07-27 19:22:43 +00:00
// 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) {}
}