diff options
| author | Obei Sideg <obei.sideg@gmail.com> | 2024-08-24 06:49:09 +0300 |
|---|---|---|
| committer | Obei Sideg <obei.sideg@gmail.com> | 2024-09-13 14:10:56 +0300 |
| commit | 3b0ce1bc33d30d7d116ee9af60df873e04bd74dc (patch) | |
| tree | d6f3aef62b82ac74c47a292c38caee216e56c77b /library/alloc | |
| parent | 74cab947f79045e34eb973199274ee5f3c132bd8 (diff) | |
| download | rust-3b0ce1bc33d30d7d116ee9af60df873e04bd74dc.tar.gz rust-3b0ce1bc33d30d7d116ee9af60df873e04bd74dc.zip | |
Update tests for hidden references to mutable static
Diffstat (limited to 'library/alloc')
| -rw-r--r-- | library/alloc/src/collections/linked_list/tests.rs | 3 | ||||
| -rw-r--r-- | library/alloc/src/collections/vec_deque/tests.rs | 3 | ||||
| -rw-r--r-- | library/alloc/tests/fmt.rs | 2 | ||||
| -rw-r--r-- | library/alloc/tests/vec.rs | 5 | ||||
| -rw-r--r-- | library/alloc/tests/vec_deque.rs | 3 |
5 files changed, 16 insertions, 0 deletions
diff --git a/library/alloc/src/collections/linked_list/tests.rs b/library/alloc/src/collections/linked_list/tests.rs index 9b3c9ac5ce5..c93e5813b11 100644 --- a/library/alloc/src/collections/linked_list/tests.rs +++ b/library/alloc/src/collections/linked_list/tests.rs @@ -1,3 +1,6 @@ +// FIXME(static_mut_refs): Do not allow `static_mut_refs` lint +#![allow(static_mut_refs)] + use std::panic::{catch_unwind, AssertUnwindSafe}; use std::thread; diff --git a/library/alloc/src/collections/vec_deque/tests.rs b/library/alloc/src/collections/vec_deque/tests.rs index f8ce4ca9788..c90679f1797 100644 --- a/library/alloc/src/collections/vec_deque/tests.rs +++ b/library/alloc/src/collections/vec_deque/tests.rs @@ -1,3 +1,6 @@ +// FIXME(static_mut_refs): Do not allow `static_mut_refs` lint +#![allow(static_mut_refs)] + use core::iter::TrustedLen; use super::*; diff --git a/library/alloc/tests/fmt.rs b/library/alloc/tests/fmt.rs index ce24a40f4c0..c13074c53b7 100644 --- a/library/alloc/tests/fmt.rs +++ b/library/alloc/tests/fmt.rs @@ -1,4 +1,6 @@ #![deny(warnings)] +// FIXME(static_mut_refs): Do not allow `static_mut_refs` lint +#![allow(static_mut_refs)] use std::cell::RefCell; use std::fmt::{self, Write}; diff --git a/library/alloc/tests/vec.rs b/library/alloc/tests/vec.rs index 3722fb06a6a..cf2ca4f0d65 100644 --- a/library/alloc/tests/vec.rs +++ b/library/alloc/tests/vec.rs @@ -1,3 +1,6 @@ +// FIXME(static_mut_refs): Do not allow `static_mut_refs` lint +#![allow(static_mut_refs)] + use core::alloc::{Allocator, Layout}; use core::num::NonZero; use core::ptr::NonNull; @@ -1284,6 +1287,8 @@ fn test_from_iter_specialization_panic_during_iteration_drops() { #[test] #[cfg_attr(not(panic = "unwind"), ignore = "test requires unwinding support")] +// FIXME(static_mut_refs): Do not allow `static_mut_refs` lint +#[cfg_attr(not(bootstrap), allow(static_mut_refs))] fn test_from_iter_specialization_panic_during_drop_doesnt_leak() { static mut DROP_COUNTER_OLD: [usize; 5] = [0; 5]; static mut DROP_COUNTER_NEW: [usize; 2] = [0; 2]; diff --git a/library/alloc/tests/vec_deque.rs b/library/alloc/tests/vec_deque.rs index f32ba8d5aa4..0891d99fe66 100644 --- a/library/alloc/tests/vec_deque.rs +++ b/library/alloc/tests/vec_deque.rs @@ -1,3 +1,6 @@ +// FIXME(static_mut_refs): Do not allow `static_mut_refs` lint +#![allow(static_mut_refs)] + use core::num::NonZero; use std::assert_matches::assert_matches; use std::collections::vec_deque::Drain; |
