about summary refs log tree commit diff
path: root/src/test/ui/panic-handler/panic-handler-twice.rs
diff options
context:
space:
mode:
authorCorey Farwell <coreyf@rwell.org>2020-12-31 23:27:33 -0500
committerCorey Farwell <coreyf@rwell.org>2020-12-31 23:27:33 -0500
commitd482de30ea70d537dced8ec04a3903e3264cf106 (patch)
tree67d6cd380ef7a66e785a54993bb0ca93b07b43ec /src/test/ui/panic-handler/panic-handler-twice.rs
parent26cc060756d0456b17fdc53ac5d34e7f7bdc873d (diff)
parent99ad5a1a2824fea1ecf60068fd3636beae7ea2da (diff)
downloadrust-d482de30ea70d537dced8ec04a3903e3264cf106.tar.gz
rust-d482de30ea70d537dced8ec04a3903e3264cf106.zip
Merge remote-tracking branch 'origin/master' into frewsxcv-san
Diffstat (limited to 'src/test/ui/panic-handler/panic-handler-twice.rs')
-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 00000000000..05bef66d849
--- /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() {}