Skip to content

Commit 18e12dc

Browse files
Rollup merge of rust-lang#117556 - obeis:static-mut-ref-lint, r=davidtwco
Disallow reference to `static mut` and adding `static_mut_ref` lint Closes rust-lang#114447 r? `@scottmcm`
2 parents a2a9032 + 837c030 commit 18e12dc

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

example/mini_core_hello_world.rs

+3
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,9 @@ fn start<T: Termination + 'static>(
111111
}
112112

113113
static mut NUM: u8 = 6 * 7;
114+
115+
// FIXME: Use `SyncUnsafeCell` instead of allowing `static_mut_ref` lint
116+
#[allow(static_mut_ref)]
114117
static NUM_REF: &'static u8 = unsafe { &NUM };
115118

116119
unsafe fn zeroed<T>() -> T {

0 commit comments

Comments
 (0)