]> git.lizzy.rs Git - rust.git/blob - src/test/ui/no-landing-pads.rs
Rollup merge of #63356 - ali-raheem:issue#63183, r=KodrAus
[rust.git] / src / test / ui / no-landing-pads.rs
1 // run-pass
2 // compile-flags: -Z no-landing-pads -C codegen-units=1
3 // ignore-emscripten no threads support
4
5 use std::thread;
6
7 static mut HIT: bool = false;
8
9 struct A;
10
11 impl Drop for A {
12     fn drop(&mut self) {
13         unsafe { HIT = true; }
14     }
15 }
16
17 fn main() {
18     thread::spawn(move|| -> () {
19         let _a = A;
20         panic!();
21     }).join().unwrap_err();
22     assert!(unsafe { !HIT });
23 }