summaryrefslogtreecommitdiffstats
path: root/tests/codegen/issue-47442.rs
blob: 6944336d33560bcd48dc5c3422b6be348a8cd93a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// check that we don't emit unneeded `resume` cleanup blocks for every
// destructor.

// CHECK-NOT: Unwind

#![feature(test)]
#![crate_type="rlib"]

extern crate test;

struct Foo {}

impl Drop for Foo {
    fn drop(&mut self) {
        test::black_box(());
    }
}

#[no_mangle]
pub fn foo() {
    let _foo = Foo {};
}