]> git.proxmox.com Git - rustc.git/blobdiff - library/std/src/panicking.rs
New upstream version 1.48.0~beta.8+dfsg1
[rustc.git] / library / std / src / panicking.rs
index 08d363a9a29649d1359f1de996bb8bcd64bc0661..8dceb12de87b894793b373df4400589e4d0344f6 100644 (file)
@@ -60,6 +60,14 @@ extern "C" fn __rust_drop_panic() -> ! {
     rtabort!("Rust panics must be rethrown");
 }
 
+/// This function is called by the panic runtime if it catches an exception
+/// object which does not correspond to a Rust panic.
+#[cfg(not(test))]
+#[rustc_std_internal_symbol]
+extern "C" fn __rust_foreign_exception() -> ! {
+    rtabort!("Rust cannot catch foreign exceptions");
+}
+
 #[derive(Copy, Clone)]
 enum Hook {
     Default,