1 // Copyright 2017 The Rust Project Developers. See the COPYRIGHT
2 // file at the top-level directory of this distribution and at
3 // http://rust-lang.org/COPYRIGHT.
5 // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6 // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8 // option. This file may not be copied, modified, or distributed
9 // except according to those terms.
11 // ignore-wasm32-bare compiled with panic=abort by default
14 let mut x = Packed(Aligned(Droppy(0)));
15 x.0 = Aligned(Droppy(0));
18 struct Aligned(Droppy);
20 struct Packed(Aligned);
23 impl Drop for Droppy {
28 // START rustc.main.EraseRegions.before.mir
34 // let mut _1: Packed;
36 // let mut _2: Aligned;
37 // let mut _3: Droppy;
38 // let mut _4: Aligned;
39 // let mut _5: Droppy;
40 // let mut _6: Aligned;
45 // _1 = Packed::{{constructor}}(move _2,);
48 // _6 = move (_1.0: Aligned);
49 // drop(_6) -> [return: bb4, unwind: bb3];
59 // (_1.0: Aligned) = move _4;
64 // (_1.0: Aligned) = move _4;
67 // drop(_1) -> [return: bb2, unwind: bb1];
70 // END rustc.main.EraseRegions.before.mir