Update test for E0796 and static_mut_ref lint
This commit is contained in:
parent
18edf9a64e
commit
a8aa6878f6
54 changed files with 807 additions and 239 deletions
|
|
@ -15,6 +15,7 @@ static GROUP_DESCRIPTIONS: &[(&str, &str)] = &[
|
|||
("future-incompatible", "Lints that detect code that has future-compatibility problems"),
|
||||
("rust-2018-compatibility", "Lints used to transition code from the 2015 edition to 2018"),
|
||||
("rust-2021-compatibility", "Lints used to transition code from the 2018 edition to 2021"),
|
||||
("rust-2024-compatibility", "Lints used to transition code from the 2021 edition to 2024"),
|
||||
];
|
||||
|
||||
type LintGroups = BTreeMap<String, BTreeSet<String>>;
|
||||
|
|
|
|||
|
|
@ -1,6 +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)]
|
||||
|
||||
#[thread_local]
|
||||
static mut TLS: u8 = 0;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,7 @@
|
|||
static mut FOO: i32 = 42;
|
||||
|
||||
// FIXME: Use `SyncUnsafeCell` instead of allowing `static_mut_ref` lint
|
||||
#[allow(static_mut_ref)]
|
||||
static BAR: Foo = Foo(unsafe { &FOO as *const _ });
|
||||
|
||||
#[allow(dead_code)]
|
||||
|
|
|
|||
|
|
@ -8,6 +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)]
|
||||
|
||||
use std::thread;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue