diff options
| author | The Miri Cronjob Bot <miri@cron.bot> | 2024-04-23 05:03:55 +0000 |
|---|---|---|
| committer | The Miri Cronjob Bot <miri@cron.bot> | 2024-04-23 05:03:55 +0000 |
| commit | cc1bf5e471ca1acdb33032849336b5af24fc46c9 (patch) | |
| tree | b32569375504b195ce038e858e98718dcb10814a /compiler/rustc_codegen_gcc/example | |
| parent | fb2396cbda433eebb0da1cdf2cc4c0b72074c2dc (diff) | |
| parent | aca749eefceaed0cda19a7ec5e472fce9387bc00 (diff) | |
| download | rust-cc1bf5e471ca1acdb33032849336b5af24fc46c9.tar.gz rust-cc1bf5e471ca1acdb33032849336b5af24fc46c9.zip | |
Merge from rustc
Diffstat (limited to 'compiler/rustc_codegen_gcc/example')
| -rw-r--r-- | compiler/rustc_codegen_gcc/example/mini_core_hello_world.rs | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/compiler/rustc_codegen_gcc/example/mini_core_hello_world.rs b/compiler/rustc_codegen_gcc/example/mini_core_hello_world.rs index add77880716..5a7ddc4cd7f 100644 --- a/compiler/rustc_codegen_gcc/example/mini_core_hello_world.rs +++ b/compiler/rustc_codegen_gcc/example/mini_core_hello_world.rs @@ -2,7 +2,7 @@ #![feature( no_core, unboxed_closures, start, lang_items, never_type, linkage, - extern_types, thread_local + extern_types, thread_local, raw_ref_op )] #![no_core] #![allow(dead_code, internal_features, non_camel_case_types)] @@ -99,9 +99,7 @@ fn start<T: Termination + 'static>( static mut NUM: u8 = 6 * 7; -// FIXME: Use `SyncUnsafeCell` instead of allowing `static_mut_refs` lint -#[allow(static_mut_refs)] -static NUM_REF: &'static u8 = unsafe { &NUM }; +static NUM_REF: &'static u8 = unsafe { &* &raw const NUM }; macro_rules! assert { ($e:expr) => { |
