about summary refs log tree commit diff
path: root/library/compiler-builtins/crates/panic-handler
diff options
context:
space:
mode:
Diffstat (limited to 'library/compiler-builtins/crates/panic-handler')
-rw-r--r--library/compiler-builtins/crates/panic-handler/Cargo.toml6
-rw-r--r--library/compiler-builtins/crates/panic-handler/src/lib.rs11
2 files changed, 17 insertions, 0 deletions
diff --git a/library/compiler-builtins/crates/panic-handler/Cargo.toml b/library/compiler-builtins/crates/panic-handler/Cargo.toml
new file mode 100644
index 00000000000..1dea613d192
--- /dev/null
+++ b/library/compiler-builtins/crates/panic-handler/Cargo.toml
@@ -0,0 +1,6 @@
+[package]
+name = "panic-handler"
+version = "0.1.0"
+authors = ["Alex Crichton <alex@alexcrichton.com>"]
+
+[dependencies]
diff --git a/library/compiler-builtins/crates/panic-handler/src/lib.rs b/library/compiler-builtins/crates/panic-handler/src/lib.rs
new file mode 100644
index 00000000000..e9706108737
--- /dev/null
+++ b/library/compiler-builtins/crates/panic-handler/src/lib.rs
@@ -0,0 +1,11 @@
+// Hack of a crate until rust-lang/rust#51647 is fixed
+
+#![feature(no_core, panic_handler)]
+#![no_core]
+
+extern crate core;
+
+#[panic_handler]
+fn panic(_: &core::panic::PanicInfo) -> ! {
+    loop {}
+}