about summary refs log tree commit diff
path: root/library/std/src/panicking.rs
diff options
context:
space:
mode:
authorMichael Goulet <michael@errs.io>2025-02-07 19:42:33 +0000
committerMichael Goulet <michael@errs.io>2025-02-09 17:11:13 +0000
commita4e7f8f9bf10588cb5519ae09a15be155499901f (patch)
tree49525f3454d966963544c40b78793dc74f0702cc /library/std/src/panicking.rs
parent04bbc8340a0e0031aef7f406c087a0ba64c1b491 (diff)
downloadrust-a4e7f8f9bf10588cb5519ae09a15be155499901f.tar.gz
rust-a4e7f8f9bf10588cb5519ae09a15be155499901f.zip
Mark extern blocks as unsafe
Diffstat (limited to 'library/std/src/panicking.rs')
-rw-r--r--library/std/src/panicking.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/library/std/src/panicking.rs b/library/std/src/panicking.rs
index 8e50bf11dd0..b47b41d4bc5 100644
--- a/library/std/src/panicking.rs
+++ b/library/std/src/panicking.rs
@@ -54,11 +54,11 @@ pub static EMPTY_PANIC: fn(&'static str) -> ! =
 // One day this may look a little less ad-hoc with the compiler helping out to
 // hook up these functions, but it is not this day!
 #[allow(improper_ctypes)]
-extern "C" {
+unsafe extern "C" {
     fn __rust_panic_cleanup(payload: *mut u8) -> *mut (dyn Any + Send + 'static);
 }
 
-extern "Rust" {
+unsafe extern "Rust" {
     /// `PanicPayload` lazily performs allocation only when needed (this avoids
     /// allocations when using the "abort" panic runtime).
     fn __rust_start_panic(payload: &mut dyn PanicPayload) -> u32;