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 /tests/ui/functional-struct-update | |
| parent | 74cab947f79045e34eb973199274ee5f3c132bd8 (diff) | |
| download | rust-3b0ce1bc33d30d7d116ee9af60df873e04bd74dc.tar.gz rust-3b0ce1bc33d30d7d116ee9af60df873e04bd74dc.zip | |
Update tests for hidden references to mutable static
Diffstat (limited to 'tests/ui/functional-struct-update')
| -rw-r--r-- | tests/ui/functional-struct-update/functional-struct-update-respects-privacy.rs | 4 | ||||
| -rw-r--r-- | tests/ui/functional-struct-update/functional-struct-update-respects-privacy.stderr | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/tests/ui/functional-struct-update/functional-struct-update-respects-privacy.rs b/tests/ui/functional-struct-update/functional-struct-update-respects-privacy.rs index 500633edf12..a05d20ffbd2 100644 --- a/tests/ui/functional-struct-update/functional-struct-update-respects-privacy.rs +++ b/tests/ui/functional-struct-update/functional-struct-update-respects-privacy.rs @@ -2,6 +2,10 @@ // The `foo` module attempts to maintains an invariant that each `S` // has a unique `u64` id. + +// FIXME(static_mut_refs): Do not allow `static_mut_refs` lint +#![allow(static_mut_refs)] + use self::foo::S; mod foo { use std::cell::{UnsafeCell}; diff --git a/tests/ui/functional-struct-update/functional-struct-update-respects-privacy.stderr b/tests/ui/functional-struct-update/functional-struct-update-respects-privacy.stderr index 692d98bc53c..8924800ef27 100644 --- a/tests/ui/functional-struct-update/functional-struct-update-respects-privacy.stderr +++ b/tests/ui/functional-struct-update/functional-struct-update-respects-privacy.stderr @@ -1,5 +1,5 @@ error[E0451]: field `secret_uid` of struct `S` is private - --> $DIR/functional-struct-update-respects-privacy.rs:28:49 + --> $DIR/functional-struct-update-respects-privacy.rs:32:49 | LL | let s_2 = foo::S { b: format!("ess two"), ..s_1 }; // FRU ... | ^^^ field `secret_uid` is private |
