diff options
| author | yuk1ty <yuk1ty@users.noreply.github.com> | 2025-04-20 10:51:19 +0900 |
|---|---|---|
| committer | yuk1ty <yuk1ty@users.noreply.github.com> | 2025-04-26 14:48:30 +0900 |
| commit | bffb7608ce727d61cb1d9d3bb58d5461375f59a5 (patch) | |
| tree | d4494c7a87053feae77833ec16f8f520782ee693 /tests/ui/statics/static-recursive.rs | |
| parent | d3508a8ad0163fab0c9b2188b3adf43c87200788 (diff) | |
| download | rust-bffb7608ce727d61cb1d9d3bb58d5461375f59a5.tar.gz rust-bffb7608ce727d61cb1d9d3bb58d5461375f59a5.zip | |
Fix error message for static references or mutable references
Diffstat (limited to 'tests/ui/statics/static-recursive.rs')
| -rw-r--r-- | tests/ui/statics/static-recursive.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/ui/statics/static-recursive.rs b/tests/ui/statics/static-recursive.rs index da23b54d1fc..dab60dd8641 100644 --- a/tests/ui/statics/static-recursive.rs +++ b/tests/ui/statics/static-recursive.rs @@ -1,7 +1,7 @@ //@ run-pass static mut S: *const u8 = unsafe { &S as *const *const u8 as *const u8 }; -//~^ WARN shared reference to mutable static is discouraged [static_mut_refs] +//~^ WARN shared reference to mutable static [static_mut_refs] struct StaticDoubleLinked { prev: &'static StaticDoubleLinked, @@ -17,7 +17,7 @@ static L3: StaticDoubleLinked = StaticDoubleLinked { prev: &L2, next: &L1, data: pub fn main() { unsafe { assert_eq!(S, *(S as *const *const u8)); - //~^ WARN creating a shared reference to mutable static is discouraged [static_mut_refs] + //~^ WARN creating a shared reference to mutable static [static_mut_refs] } let mut test_vec = Vec::new(); |
