]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-87707.rs
Rollup merge of #104059 - Rejyr:rustc_middle-lint-typo, r=petrochenkov
[rust.git] / src / test / ui / issues / issue-87707.rs
1 // test for #87707
2 // edition:2018
3 // run-fail
4 // exec-env:RUST_BACKTRACE=0
5 // check-run-results
6 // needs-unwind uses catch_unwind
7
8 use std::sync::Once;
9 use std::panic;
10
11 fn main() {
12     let o = Once::new();
13     let _ = panic::catch_unwind(|| {
14         o.call_once(|| panic!("Here Once instance is poisoned."));
15     });
16     o.call_once(|| {});
17 }