2019-10-18 16:47:54 -05:00
|
|
|
// ignore-wasm32-bare compiled with panic=abort by default
|
2017-11-26 12:39:16 -06:00
|
|
|
|
2017-08-14 06:10:05 -05:00
|
|
|
#![feature(box_syntax)]
|
|
|
|
|
2020-07-27 14:22:43 -05:00
|
|
|
// EMIT_MIR box_expr.main.ElaborateDrops.before.mir
|
2017-08-14 06:10:05 -05:00
|
|
|
fn main() {
|
|
|
|
let x = box S::new();
|
|
|
|
drop(x);
|
|
|
|
}
|
|
|
|
|
|
|
|
struct S;
|
|
|
|
|
|
|
|
impl S {
|
|
|
|
fn new() -> Self { S }
|
|
|
|
}
|
|
|
|
|
|
|
|
impl Drop for S {
|
|
|
|
fn drop(&mut self) {
|
|
|
|
println!("splat!");
|
|
|
|
}
|
|
|
|
}
|