]> git.lizzy.rs Git - rust.git/blob - src/test/ui/not-panic/not-panic-safe.rs
Rollup merge of #87440 - twetzel59:fix-barrier-no-op, r=yaahc
[rust.git] / src / test / ui / not-panic / not-panic-safe.rs
1 #![allow(dead_code)]
2 #![feature(recover)]
3
4 use std::panic::UnwindSafe;
5
6 fn assert<T: UnwindSafe + ?Sized>() {}
7
8 fn main() {
9     assert::<&mut i32>();
10     //~^ ERROR the type `&mut i32` may not be safely transferred across an unwind boundary
11 }