]> git.proxmox.com Git - rustc.git/blob - tests/mir-opt/box_expr.rs
New upstream version 1.68.2+dfsg1
[rustc.git] / tests / 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 }