2018-01-15 23:57:44 +02:00
|
|
|
// check that we don't emit unneeded `resume` cleanup blocks for every
|
|
|
|
|
// destructor.
|
|
|
|
|
|
|
|
|
|
// CHECK-NOT: Unwind
|
|
|
|
|
|
|
|
|
|
#![feature(test)]
|
2024-05-29 14:11:20 +10:00
|
|
|
#![crate_type = "rlib"]
|
2018-01-15 23:57:44 +02:00
|
|
|
|
|
|
|
|
extern crate test;
|
|
|
|
|
|
|
|
|
|
struct Foo {}
|
|
|
|
|
|
|
|
|
|
impl Drop for Foo {
|
|
|
|
|
fn drop(&mut self) {
|
|
|
|
|
test::black_box(());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#[no_mangle]
|
|
|
|
|
pub fn foo() {
|
|
|
|
|
let _foo = Foo {};
|
|
|
|
|
}
|