Use unsafe extern blocks throughout the compiler
This commit is contained in:
parent
515395af0e
commit
38e62b9841
7 changed files with 29 additions and 26 deletions
|
@ -1,5 +1,6 @@
|
|||
// 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)]
|
||||
|
@ -28,7 +29,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 +47,7 @@ pub fn initialize_available_targets() {
|
|||
($cfg:meta, $($method:ident),*) => { {
|
||||
#[cfg($cfg)]
|
||||
fn init() {
|
||||
extern "C" {
|
||||
unsafe extern "C" {
|
||||
$(fn $method();)*
|
||||
}
|
||||
unsafe {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue