2019-08-17 00:08:01 -05:00
|
|
|
// ignore-emscripten compiled with panic=abort by default
|
2017-11-26 12:39:16 -06:00
|
|
|
|
2017-10-03 09:01:01 -05:00
|
|
|
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) {}
|
|
|
|
}
|
|
|
|
|
|
|
|
// END RUST SOURCE
|
|
|
|
// START rustc.main.EraseRegions.before.mir
|
|
|
|
// fn main() -> () {
|
|
|
|
// let mut _0: ();
|
2019-04-02 16:29:28 -05:00
|
|
|
// let mut _1: Packed;
|
2017-10-03 09:01:01 -05:00
|
|
|
// let mut _2: Aligned;
|
|
|
|
// let mut _3: Droppy;
|
|
|
|
// let mut _4: Aligned;
|
|
|
|
// let mut _5: Droppy;
|
|
|
|
// let mut _6: Aligned;
|
2018-05-17 10:32:47 -05:00
|
|
|
// scope 1 {
|
|
|
|
// }
|
2017-10-03 09:01:01 -05:00
|
|
|
//
|
|
|
|
// bb0: {
|
|
|
|
// StorageLive(_1);
|
|
|
|
// ...
|
2018-10-19 07:24:29 -05:00
|
|
|
// _1 = Packed(move _2,);
|
2017-10-03 09:01:01 -05:00
|
|
|
// ...
|
|
|
|
// StorageLive(_6);
|
2017-11-17 10:22:44 -06:00
|
|
|
// _6 = move (_1.0: Aligned);
|
2017-10-03 09:01:01 -05:00
|
|
|
// drop(_6) -> [return: bb4, unwind: bb3];
|
|
|
|
// }
|
2019-03-03 13:04:26 -06:00
|
|
|
// bb1 (cleanup): {
|
2017-10-03 09:01:01 -05:00
|
|
|
// resume;
|
|
|
|
// }
|
|
|
|
// bb2: {
|
|
|
|
// StorageDead(_1);
|
|
|
|
// return;
|
|
|
|
// }
|
2019-03-03 13:04:26 -06:00
|
|
|
// bb3 (cleanup): {
|
2017-11-17 10:22:44 -06:00
|
|
|
// (_1.0: Aligned) = move _4;
|
2017-10-03 09:01:01 -05:00
|
|
|
// drop(_1) -> bb1;
|
|
|
|
// }
|
|
|
|
// bb4: {
|
|
|
|
// StorageDead(_6);
|
2017-11-17 10:22:44 -06:00
|
|
|
// (_1.0: Aligned) = move _4;
|
2017-10-03 09:01:01 -05:00
|
|
|
// StorageDead(_4);
|
|
|
|
// _0 = ();
|
2017-11-27 17:45:16 -06:00
|
|
|
// drop(_1) -> [return: bb2, unwind: bb1];
|
2017-10-03 09:01:01 -05:00
|
|
|
// }
|
|
|
|
// }
|
|
|
|
// END rustc.main.EraseRegions.before.mir
|