Skip to content

Commit 4b73d97

Browse files
committed
Auto merge of #121034 - obeis:improve-static-mut-ref, r=RalfJung
Improve wording of `static_mut_ref` Close #120964
2 parents 516954b + 4ff38ef commit 4b73d97

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

tests/fail/tls/tls_static_dealloc.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
//! Ensure that thread-local statics get deallocated when the thread dies.
22
33
#![feature(thread_local)]
4-
// FIXME: Use `SyncUnsafeCell` instead of allowing `static_mut_ref` lint
5-
#![allow(static_mut_ref)]
4+
// FIXME: Use `SyncUnsafeCell` instead of allowing `static_mut_refs` lint
5+
#![allow(static_mut_refs)]
66

77
#[thread_local]
88
static mut TLS: u8 = 0;

tests/pass/static_mut.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
static mut FOO: i32 = 42;
22

3-
// FIXME: Use `SyncUnsafeCell` instead of allowing `static_mut_ref` lint
4-
#[allow(static_mut_ref)]
3+
// FIXME: Use `SyncUnsafeCell` instead of allowing `static_mut_refs` lint
4+
#[allow(static_mut_refs)]
55
static BAR: Foo = Foo(unsafe { &FOO as *const _ });
66

77
#[allow(dead_code)]

tests/pass/tls/tls_static.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
//! test, we also check that thread-locals act as per-thread statics.
99
1010
#![feature(thread_local)]
11-
// FIXME: Use `SyncUnsafeCell` instead of allowing `static_mut_ref` lint
12-
#![allow(static_mut_ref)]
11+
// FIXME: Use `SyncUnsafeCell` instead of allowing `static_mut_refs` lint
12+
#![allow(static_mut_refs)]
1313

1414
use std::thread;
1515

0 commit comments

Comments
 (0)