blob: beaf0baf12c0ba93ec2cc80fd6bfc566a3d1c66c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
// ignore-wasm32-bare compiled with panic=abort by default
#![feature(box_syntax)]
// EMIT_MIR rustc.main.ElaborateDrops.before.mir
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!");
}
}
|