diff options
Diffstat (limited to 'tests/ui/not-panic/not-panic-safe.rs')
-rw-r--r-- | tests/ui/not-panic/not-panic-safe.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/ui/not-panic/not-panic-safe.rs b/tests/ui/not-panic/not-panic-safe.rs new file mode 100644 index 000000000..1b3c6482c --- /dev/null +++ b/tests/ui/not-panic/not-panic-safe.rs @@ -0,0 +1,10 @@ +#![allow(dead_code)] + +use std::panic::UnwindSafe; + +fn assert<T: UnwindSafe + ?Sized>() {} + +fn main() { + assert::<&mut &mut &i32>(); + //~^ ERROR the type `&mut &mut &i32` may not be safely transferred across an unwind boundary +} |