Skip to content

Commit ceaec15

Browse files
committed
Auto merge of #119767 - GuillaumeGomez:rollup-fbp26yb, r=GuillaumeGomez
Rollup of 9 pull requests Successful merges: - #117556 (Disallow reference to `static mut` and adding `static_mut_ref` lint) - #118748 (std: getrandom simplification for freebsd.) - #119282 (Rework and improve the unstable documentation of check-cfg) - #119527 (don't reexport atomic::ordering via rustc_data_structures, use std import) - #119668 (Simplify implementation of MIR promotion) - #119699 (Merge dead bb pruning and unreachable bb deduplication.) - #119723 (Remove `-Zdont-buffer-diagnostics`.) - #119756 (rustdoc-search: reuse individual types in function signatures) - #119758 (GNU/Hurd: unconditionally use inline stack probes) r? `@ghost` `@rustbot` modify labels: rollup
2 parents 4b00bfb + cbc9ee2 commit ceaec15

File tree

3 files changed

+7
-0
lines changed

3 files changed

+7
-0
lines changed

tests/fail/tls/tls_static_dealloc.rs

+2
Original file line numberDiff line numberDiff line change
@@ -1,6 +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)]
46

57
#[thread_local]
68
static mut TLS: u8 = 0;

tests/pass/static_mut.rs

+3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
static mut FOO: i32 = 42;
2+
3+
// FIXME: Use `SyncUnsafeCell` instead of allowing `static_mut_ref` lint
4+
#[allow(static_mut_ref)]
25
static BAR: Foo = Foo(unsafe { &FOO as *const _ });
36

47
#[allow(dead_code)]

tests/pass/tls/tls_static.rs

+2
Original file line numberDiff line numberDiff line change
@@ -8,6 +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)]
1113

1214
use std::thread;
1315

0 commit comments

Comments
 (0)