summaryrefslogtreecommitdiffstats
path: root/tests/ui/panic-handler/panic-handler-twice.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/panic-handler/panic-handler-twice.rs')
-rw-r--r--tests/ui/panic-handler/panic-handler-twice.rs19
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/ui/panic-handler/panic-handler-twice.rs b/tests/ui/panic-handler/panic-handler-twice.rs
new file mode 100644
index 000000000..05bef66d8
--- /dev/null
+++ b/tests/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() {}