summaryrefslogtreecommitdiffstats
path: root/tests/ui/not-panic/not-panic-safe.rs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--tests/ui/not-panic/not-panic-safe.rs10
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
+}