mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 23:04:33 +00:00
18 lines
370 B
Rust
18 lines
370 B
Rust
// ignore-wasm32-bare compiled with panic=abort by default
|
|
|
|
|
|
// 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) {}
|
|
}
|