]> git.lizzy.rs Git - rust.git/blob - tests/codegen/issue-47442.rs
Rollup merge of #106570 - Xaeroxe:div-duration-tests, r=JohnTitor
[rust.git] / tests / codegen / issue-47442.rs
1 // check that we don't emit unneeded `resume` cleanup blocks for every
2 // destructor.
3
4 // CHECK-NOT: Unwind
5
6 #![feature(test)]
7 #![crate_type="rlib"]
8
9 extern crate test;
10
11 struct Foo {}
12
13 impl Drop for Foo {
14     fn drop(&mut self) {
15         test::black_box(());
16     }
17 }
18
19 #[no_mangle]
20 pub fn foo() {
21     let _foo = Foo {};
22 }