diff options
| author | Obei Sideg <obei.sideg@gmail.com> | 2023-12-22 15:12:01 +0300 |
|---|---|---|
| committer | Obei Sideg <obei.sideg@gmail.com> | 2024-01-07 17:29:25 +0300 |
| commit | a8aa6878f63e53a9b0cfee542e9765407e1ca0d6 (patch) | |
| tree | beffa149b8d74a34ca8461831ee1222ec4def133 /tests/ui/statics/static-mut-xc.rs | |
| parent | 18edf9a64e8d84e72a6be67df3822e57dea8d34a (diff) | |
| download | rust-a8aa6878f63e53a9b0cfee542e9765407e1ca0d6.tar.gz rust-a8aa6878f63e53a9b0cfee542e9765407e1ca0d6.zip | |
Update test for `E0796` and `static_mut_ref` lint
Diffstat (limited to 'tests/ui/statics/static-mut-xc.rs')
| -rw-r--r-- | tests/ui/statics/static-mut-xc.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/ui/statics/static-mut-xc.rs b/tests/ui/statics/static-mut-xc.rs index 1d172d26a59..2fc265e02ea 100644 --- a/tests/ui/statics/static-mut-xc.rs +++ b/tests/ui/statics/static-mut-xc.rs @@ -7,7 +7,6 @@ // aux-build:static_mut_xc.rs - extern crate static_mut_xc; unsafe fn static_bound(_: &'static isize) {} @@ -27,7 +26,9 @@ unsafe fn run() { static_mut_xc::a = -3; assert_eq!(static_mut_xc::a, -3); static_bound(&static_mut_xc::a); + //~^ WARN shared reference of mutable static is discouraged [static_mut_ref] static_bound_set(&mut static_mut_xc::a); + //~^ WARN mutable reference of mutable static is discouraged [static_mut_ref] } pub fn main() { |
