]> git.lizzy.rs Git - rust.git/blob - src/test/mir-opt/box_expr.rs
Merge commit 'b71f3405606d49b9735606b479c3415a0ca9810f' into clippyup
[rust.git] / src / test / mir-opt / box_expr.rs
1 // ignore-wasm32-bare compiled with panic=abort by default
2
3 #![feature(box_syntax)]
4
5 // EMIT_MIR box_expr.main.ElaborateDrops.before.mir
6 fn main() {
7     let x = box S::new();
8     drop(x);
9 }
10
11 struct S;
12
13 impl S {
14     fn new() -> Self { S }
15 }
16
17 impl Drop for S {
18     fn drop(&mut self) {
19         println!("splat!");
20     }
21 }