Improve wording of static_mut_ref

Rename `static_mut_ref` lint to `static_mut_refs`.
This commit is contained in:
Obei Sideg 2024-02-17 22:01:56 +03:00
parent eeeb021954
commit 408eeae59d
73 changed files with 783 additions and 460 deletions

View file

@ -1,8 +1,8 @@
//! Ensure that thread-local statics get deallocated when the thread dies.
#![feature(thread_local)]
// FIXME: Use `SyncUnsafeCell` instead of allowing `static_mut_ref` lint
#![allow(static_mut_ref)]
// FIXME: Use `SyncUnsafeCell` instead of allowing `static_mut_refs` lint
#![allow(static_mut_refs)]
#[thread_local]
static mut TLS: u8 = 0;

View file

@ -1,7 +1,7 @@
static mut FOO: i32 = 42;
// FIXME: Use `SyncUnsafeCell` instead of allowing `static_mut_ref` lint
#[allow(static_mut_ref)]
// FIXME: Use `SyncUnsafeCell` instead of allowing `static_mut_refs` lint
#[allow(static_mut_refs)]
static BAR: Foo = Foo(unsafe { &FOO as *const _ });
#[allow(dead_code)]

View file

@ -8,8 +8,8 @@
//! test, we also check that thread-locals act as per-thread statics.
#![feature(thread_local)]
// FIXME: Use `SyncUnsafeCell` instead of allowing `static_mut_ref` lint
#![allow(static_mut_ref)]
// FIXME: Use `SyncUnsafeCell` instead of allowing `static_mut_refs` lint
#![allow(static_mut_refs)]
use std::thread;