about summary refs log tree commit diff
path: root/tests/ui/static/reference-of-mut-static-safe.rs
diff options
context:
space:
mode:
authorObei Sideg <obei.sideg@gmail.com>2024-02-17 22:01:56 +0300
committerObei Sideg <obei.sideg@gmail.com>2024-02-18 06:01:40 +0300
commit408eeae59d35cbcaab2cfb345d24373954e74fc5 (patch)
tree96f35aa95f6fba769db2c292965e8a7ec9c09498 /tests/ui/static/reference-of-mut-static-safe.rs
parenteeeb021954e30a6b16fc12cc4b8a1bcf7910a40e (diff)
downloadrust-408eeae59d35cbcaab2cfb345d24373954e74fc5.tar.gz
rust-408eeae59d35cbcaab2cfb345d24373954e74fc5.zip
Improve wording of static_mut_ref
Rename `static_mut_ref` lint to `static_mut_refs`.
Diffstat (limited to 'tests/ui/static/reference-of-mut-static-safe.rs')
-rw-r--r--tests/ui/static/reference-of-mut-static-safe.rs13
1 files changed, 0 insertions, 13 deletions
diff --git a/tests/ui/static/reference-of-mut-static-safe.rs b/tests/ui/static/reference-of-mut-static-safe.rs
deleted file mode 100644
index d113d0ee48d..00000000000
--- a/tests/ui/static/reference-of-mut-static-safe.rs
+++ /dev/null
@@ -1,13 +0,0 @@
-//@ revisions: e2021 e2024
-
-//@ [e2021] edition:2021
-//@ [e2024] compile-flags: --edition 2024 -Z unstable-options
-
-fn main() {
-    static mut X: i32 = 1;
-
-    let _x = &X;
-    //[e2024]~^ reference of mutable static is disallowed [E0796]
-    //[e2021]~^^ use of mutable static is unsafe and requires unsafe function or block [E0133]
-    //[e2021]~^^^ shared reference of mutable static is discouraged [static_mut_ref]
-}