about summary refs log tree commit diff
path: root/compiler/rustc_driver_impl/src
diff options
context:
space:
mode:
authorMichael Goulet <michael@errs.io>2024-08-26 19:40:43 -0400
committerMichael Goulet <michael@errs.io>2024-08-26 19:51:05 -0400
commit38e62b98418c22d3a00f5af689ae538e4216fb5f (patch)
tree5a4847b102fd5334889d9faa4cb464aa4f3681dc /compiler/rustc_driver_impl/src
parent515395af0efdbdd657ff08a1f6d28e553856654f (diff)
downloadrust-38e62b98418c22d3a00f5af689ae538e4216fb5f.tar.gz
rust-38e62b98418c22d3a00f5af689ae538e4216fb5f.zip
Use unsafe extern blocks throughout the compiler
Diffstat (limited to 'compiler/rustc_driver_impl/src')
-rw-r--r--compiler/rustc_driver_impl/src/lib.rs1
-rw-r--r--compiler/rustc_driver_impl/src/signal_handler.rs2
2 files changed, 2 insertions, 1 deletions
diff --git a/compiler/rustc_driver_impl/src/lib.rs b/compiler/rustc_driver_impl/src/lib.rs
index 2b7dc040f64..ed072cd10b7 100644
--- a/compiler/rustc_driver_impl/src/lib.rs
+++ b/compiler/rustc_driver_impl/src/lib.rs
@@ -7,6 +7,7 @@
 // tidy-alphabetical-start
 #![allow(internal_features)]
 #![allow(rustc::untranslatable_diagnostic)] // FIXME: make this translatable
+#![cfg_attr(bootstrap, feature(unsafe_extern_blocks))]
 #![doc(html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/")]
 #![doc(rust_logo)]
 #![feature(decl_macro)]
diff --git a/compiler/rustc_driver_impl/src/signal_handler.rs b/compiler/rustc_driver_impl/src/signal_handler.rs
index 51f2a508cf9..e1f868c2522 100644
--- a/compiler/rustc_driver_impl/src/signal_handler.rs
+++ b/compiler/rustc_driver_impl/src/signal_handler.rs
@@ -6,7 +6,7 @@ use std::{fmt, mem, ptr};
 
 use rustc_interface::util::{DEFAULT_STACK_SIZE, STACK_SIZE};
 
-extern "C" {
+unsafe extern "C" {
     fn backtrace_symbols_fd(buffer: *const *mut libc::c_void, size: libc::c_int, fd: libc::c_int);
 }