summaryrefslogtreecommitdiffstats
path: root/src/test/ui/panic-handler/panic-handler-twice.rs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/test/ui/panic-handler/panic-handler-twice.rs19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/test/ui/panic-handler/panic-handler-twice.rs b/src/test/ui/panic-handler/panic-handler-twice.rs
new file mode 100644
index 000000000..05bef66d8
--- /dev/null
+++ b/src/test/ui/panic-handler/panic-handler-twice.rs
@@ -0,0 +1,19 @@
+// dont-check-compiler-stderr
+// aux-build:some-panic-impl.rs
+
+#![feature(lang_items)]
+#![no_std]
+#![no_main]
+
+extern crate some_panic_impl;
+
+use core::panic::PanicInfo;
+
+#[panic_handler]
+fn panic(info: &PanicInfo) -> ! {
+ //~^ ERROR found duplicate lang item `panic_impl`
+ loop {}
+}
+
+#[lang = "eh_personality"]
+fn eh() {}