diff --git a/tests/pass-dep/concurrency/linux-futex.rs b/tests/pass-dep/concurrency/linux-futex.rs index e84ffee367..255a93226a 100644 --- a/tests/pass-dep/concurrency/linux-futex.rs +++ b/tests/pass-dep/concurrency/linux-futex.rs @@ -1,6 +1,9 @@ //@only-target: linux //@compile-flags: -Zmiri-disable-isolation +// FIXME(static_mut_refs): Do not allow `static_mut_refs` lint +#![allow(static_mut_refs)] + use std::mem::MaybeUninit; use std::ptr::{self, addr_of}; use std::sync::atomic::AtomicI32; diff --git a/tests/pass-dep/concurrency/tls_pthread_drop_order.rs b/tests/pass-dep/concurrency/tls_pthread_drop_order.rs index 87c8a2e106..2dc09709b8 100644 --- a/tests/pass-dep/concurrency/tls_pthread_drop_order.rs +++ b/tests/pass-dep/concurrency/tls_pthread_drop_order.rs @@ -5,6 +5,9 @@ //! the fallback path in `guard::key::enable`, which uses a *single* pthread_key //! to manage a thread-local list of dtors to call. +// FIXME(static_mut_refs): Do not allow `static_mut_refs` lint +#![allow(static_mut_refs)] + use std::mem; use std::ptr; diff --git a/tests/pass-dep/libc/libc-eventfd.rs b/tests/pass-dep/libc/libc-eventfd.rs index 1e3d486233..1d08419465 100644 --- a/tests/pass-dep/libc/libc-eventfd.rs +++ b/tests/pass-dep/libc/libc-eventfd.rs @@ -2,6 +2,9 @@ // test_race depends on a deterministic schedule. //@compile-flags: -Zmiri-preemption-rate=0 +// FIXME(static_mut_refs): Do not allow `static_mut_refs` lint +#![allow(static_mut_refs)] + use std::thread; fn main() { diff --git a/tests/pass-dep/libc/libc-pipe.rs b/tests/pass-dep/libc/libc-pipe.rs index c6e8355c3f..76f883e5d8 100644 --- a/tests/pass-dep/libc/libc-pipe.rs +++ b/tests/pass-dep/libc/libc-pipe.rs @@ -72,6 +72,8 @@ fn test_pipe_threaded() { thread2.join().unwrap(); } +// FIXME(static_mut_refs): Do not allow `static_mut_refs` lint +#[allow(static_mut_refs)] fn test_race() { static mut VAL: u8 = 0; let mut fds = [-1, -1]; diff --git a/tests/pass-dep/libc/libc-socketpair.rs b/tests/pass-dep/libc/libc-socketpair.rs index c3d6af5a1e..64819e5767 100644 --- a/tests/pass-dep/libc/libc-socketpair.rs +++ b/tests/pass-dep/libc/libc-socketpair.rs @@ -1,6 +1,10 @@ //@ignore-target: windows # No libc socketpair on Windows // test_race depends on a deterministic schedule. //@compile-flags: -Zmiri-preemption-rate=0 + +// FIXME(static_mut_refs): Do not allow `static_mut_refs` lint +#![allow(static_mut_refs)] + use std::thread; fn main() { test_socketpair(); diff --git a/tests/pass/atomic.rs b/tests/pass/atomic.rs index dfdc9b42f8..c03023ee69 100644 --- a/tests/pass/atomic.rs +++ b/tests/pass/atomic.rs @@ -1,7 +1,11 @@ //@revisions: stack tree //@[tree]compile-flags: -Zmiri-tree-borrows //@compile-flags: -Zmiri-strict-provenance + #![feature(strict_provenance, strict_provenance_atomic_ptr)] +// FIXME(static_mut_refs): Do not allow `static_mut_refs` lint +#![allow(static_mut_refs)] + use std::sync::atomic::{ compiler_fence, fence, AtomicBool, AtomicIsize, AtomicPtr, AtomicU64, Ordering::*, }; diff --git a/tests/pass/drop_on_array_elements.rs b/tests/pass/drop_on_array_elements.rs index ae1ef03626..4bf241fee2 100644 --- a/tests/pass/drop_on_array_elements.rs +++ b/tests/pass/drop_on_array_elements.rs @@ -1,3 +1,5 @@ +#![allow(static_mut_refs)] + struct Bar(u16); // ZSTs are tested separately static mut DROP_COUNT: usize = 0; diff --git a/tests/pass/drop_on_fat_ptr_array_elements.rs b/tests/pass/drop_on_fat_ptr_array_elements.rs index 40025cd07f..04723af94c 100644 --- a/tests/pass/drop_on_fat_ptr_array_elements.rs +++ b/tests/pass/drop_on_fat_ptr_array_elements.rs @@ -1,3 +1,5 @@ +#![allow(static_mut_refs)] + trait Foo {} struct Bar; diff --git a/tests/pass/drop_on_zst_array_elements.rs b/tests/pass/drop_on_zst_array_elements.rs index babe098e4e..71398724f2 100644 --- a/tests/pass/drop_on_zst_array_elements.rs +++ b/tests/pass/drop_on_zst_array_elements.rs @@ -1,3 +1,5 @@ +#![allow(static_mut_refs)] + struct Bar; static mut DROP_COUNT: usize = 0; diff --git a/tests/pass/drop_through_owned_slice.rs b/tests/pass/drop_through_owned_slice.rs index 8cdeb57d02..2d1d876e6f 100644 --- a/tests/pass/drop_through_owned_slice.rs +++ b/tests/pass/drop_through_owned_slice.rs @@ -1,3 +1,5 @@ +#![allow(static_mut_refs)] + struct Bar; static mut DROP_COUNT: usize = 0; diff --git a/tests/pass/static_memory_modification.rs b/tests/pass/static_memory_modification.rs index 84a524b1ed..1900250bf4 100644 --- a/tests/pass/static_memory_modification.rs +++ b/tests/pass/static_memory_modification.rs @@ -1,3 +1,6 @@ +// FIXME(static_mut_refs): Do not allow `static_mut_refs` lint +#![allow(static_mut_refs)] + use std::sync::atomic::{AtomicUsize, Ordering}; static mut X: usize = 5; diff --git a/tests/pass/static_mut.rs b/tests/pass/static_mut.rs index 4488b5a09d..f88c7a16e6 100644 --- a/tests/pass/static_mut.rs +++ b/tests/pass/static_mut.rs @@ -1,3 +1,6 @@ +// FIXME(static_mut_refs): Do not allow `static_mut_refs` lint +#![allow(static_mut_refs)] + use std::ptr::addr_of; static mut FOO: i32 = 42; diff --git a/tests/pass/tls/tls_static.rs b/tests/pass/tls/tls_static.rs index 8d0e5089d4..cc4eaca72a 100644 --- a/tests/pass/tls/tls_static.rs +++ b/tests/pass/tls/tls_static.rs @@ -7,6 +7,8 @@ //! dereferencing the pointer on `t2` resolves to `t1`'s thread-local. In this //! test, we also check that thread-locals act as per-thread statics. +// FIXME(static_mut_refs): Do not allow `static_mut_refs` lint +#![allow(static_mut_refs)] #![feature(thread_local)] use std::ptr::addr_of_mut;