From a8aa6878f63e53a9b0cfee542e9765407e1ca0d6 Mon Sep 17 00:00:00 2001 From: Obei Sideg Date: Fri, 22 Dec 2023 15:12:01 +0300 Subject: Update test for `E0796` and `static_mut_ref` lint --- compiler/rustc_codegen_cranelift/example/mini_core_hello_world.rs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'compiler/rustc_codegen_cranelift/example') diff --git a/compiler/rustc_codegen_cranelift/example/mini_core_hello_world.rs b/compiler/rustc_codegen_cranelift/example/mini_core_hello_world.rs index a1cdf31c68a..2a7b1107ffc 100644 --- a/compiler/rustc_codegen_cranelift/example/mini_core_hello_world.rs +++ b/compiler/rustc_codegen_cranelift/example/mini_core_hello_world.rs @@ -111,6 +111,9 @@ fn start( } static mut NUM: u8 = 6 * 7; + +// FIXME: Use `SyncUnsafeCell` instead of allowing `static_mut_ref` lint +#[allow(static_mut_ref)] static NUM_REF: &'static u8 = unsafe { &NUM }; unsafe fn zeroed() -> T { -- cgit 1.4.1-3-g733a5