rust/tests/ui/not-panic/not-panic-safe.rs
2023-01-11 09:32:08 +00:00

11 lines
222 B
Rust

#![allow(dead_code)]
use std::panic::UnwindSafe;
fn assert<T: UnwindSafe + ?Sized>() {}
fn main() {
assert::<&mut i32>();
//~^ ERROR the type `&mut i32` may not be safely transferred across an unwind boundary
}