]> git.proxmox.com Git - rustc.git/blob - tests/ui/issues/issue-43853.rs
New upstream version 1.68.2+dfsg1
[rustc.git] / tests / ui / issues / issue-43853.rs
1 // run-pass
2 // needs-unwind
3
4 use std::panic;
5
6 fn test() {
7 wait(|| panic!());
8 }
9
10 fn wait<T, F: FnOnce() -> T>(f: F) -> F::Output {
11 From::from(f())
12 }
13
14 fn main() {
15 let result = panic::catch_unwind(move || test());
16 assert!(result.is_err());
17 }