summaryrefslogtreecommitdiffstats
path: root/tests/ui/panic-handler/panic-handler-std.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/panic-handler/panic-handler-std.rs')
-rw-r--r--tests/ui/panic-handler/panic-handler-std.rs12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/ui/panic-handler/panic-handler-std.rs b/tests/ui/panic-handler/panic-handler-std.rs
new file mode 100644
index 000000000..6183c886c
--- /dev/null
+++ b/tests/ui/panic-handler/panic-handler-std.rs
@@ -0,0 +1,12 @@
+// normalize-stderr-test "loaded from .*libstd-.*.rlib" -> "loaded from SYSROOT/libstd-*.rlib"
+// error-pattern: found duplicate lang item `panic_impl`
+
+
+use std::panic::PanicInfo;
+
+#[panic_handler]
+fn panic(info: PanicInfo) -> ! {
+ loop {}
+}
+
+fn main() {}