about summary refs log tree commit diff
path: root/tests/ui/statics/static-mut-xc.rs
diff options
context:
space:
mode:
authorObei Sideg <obei.sideg@gmail.com>2023-12-22 15:12:01 +0300
committerObei Sideg <obei.sideg@gmail.com>2024-01-07 17:29:25 +0300
commita8aa6878f63e53a9b0cfee542e9765407e1ca0d6 (patch)
treebeffa149b8d74a34ca8461831ee1222ec4def133 /tests/ui/statics/static-mut-xc.rs
parent18edf9a64e8d84e72a6be67df3822e57dea8d34a (diff)
downloadrust-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.rs3
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() {