diff options
| author | bors <bors@rust-lang.org> | 2024-08-27 20:57:15 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-08-27 20:57:15 +0000 |
| commit | 1f12b9b0fdbe735968ac002792a720f0ba4faca6 (patch) | |
| tree | 7f6068cbd36311d85e223378ef65d4b7452659c4 /compiler/rustc_llvm/src | |
| parent | ab869e094a907cc5d19b4080f22eccaf347f1f95 (diff) | |
| parent | ac0cc709c3840c0617498950d26d12b3d4a4c1f3 (diff) | |
| download | rust-1f12b9b0fdbe735968ac002792a720f0ba4faca6.tar.gz rust-1f12b9b0fdbe735968ac002792a720f0ba4faca6.zip | |
Auto merge of #129665 - matthiaskrgr:rollup-hy23k7d, r=matthiaskrgr
Rollup of 8 pull requests Successful merges: - #129507 (make it possible to enable const_precise_live_drops per-function) - #129581 (exit: explain our expectations for the exit handlers registered in a Rust program) - #129634 (Fix tidy to allow `edition = "2024"` in `Cargo.toml`) - #129635 (Use unsafe extern blocks throughout the compiler) - #129645 (Fix typos in floating-point primitive type docs) - #129648 (More `unreachable_pub`) - #129649 (ABI compat check: detect unadjusted ABI mismatches) - #129652 (fix Pointer to reference conversion docs) r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_llvm/src')
| -rw-r--r-- | compiler/rustc_llvm/src/lib.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/compiler/rustc_llvm/src/lib.rs b/compiler/rustc_llvm/src/lib.rs index 939e5e4dbd4..3532d50c64e 100644 --- a/compiler/rustc_llvm/src/lib.rs +++ b/compiler/rustc_llvm/src/lib.rs @@ -1,8 +1,10 @@ // tidy-alphabetical-start #![allow(internal_features)] +#![cfg_attr(bootstrap, feature(unsafe_attributes, unsafe_extern_blocks))] #![doc(html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/")] #![doc(rust_logo)] #![feature(rustdoc_internals)] +#![warn(unreachable_pub)] // tidy-alphabetical-end // NOTE: This crate only exists to allow linking on mingw targets. @@ -28,7 +30,7 @@ impl RustString { } /// Appending to a Rust string -- used by RawRustStringOstream. -#[no_mangle] +#[unsafe(no_mangle)] pub unsafe extern "C" fn LLVMRustStringWriteImpl( sr: &RustString, ptr: *const c_char, @@ -46,7 +48,7 @@ pub fn initialize_available_targets() { ($cfg:meta, $($method:ident),*) => { { #[cfg($cfg)] fn init() { - extern "C" { + unsafe extern "C" { $(fn $method();)* } unsafe { |
