Update tests for hidden references to mutable static

This commit is contained in:
Obei Sideg
2024-08-24 06:49:09 +03:00
parent 74cab947f7
commit 3b0ce1bc33
111 changed files with 803 additions and 744 deletions

View File

@@ -103,6 +103,9 @@ fn smoke_dtor() {
#[test]
fn circular() {
// FIXME(static_mut_refs): Do not allow `static_mut_refs` lint
#![allow(static_mut_refs)]
struct S1(&'static LocalKey<UnsafeCell<Option<S1>>>, &'static LocalKey<UnsafeCell<Option<S2>>>);
struct S2(&'static LocalKey<UnsafeCell<Option<S1>>>, &'static LocalKey<UnsafeCell<Option<S2>>>);
thread_local!(static K1: UnsafeCell<Option<S1>> = UnsafeCell::new(None));