about summary refs log tree commit diff
path: root/tests/ui/static/reference-to-mut-static-safe.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/static/reference-to-mut-static-safe.rs')
-rw-r--r--tests/ui/static/reference-to-mut-static-safe.rs13
1 files changed, 0 insertions, 13 deletions
diff --git a/tests/ui/static/reference-to-mut-static-safe.rs b/tests/ui/static/reference-to-mut-static-safe.rs
deleted file mode 100644
index 98afdadf4d2..00000000000
--- a/tests/ui/static/reference-to-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]~^ creating a shared reference to a mutable static [E0796]
-    //~^^ use of mutable static is unsafe and requires unsafe
-    //[e2021]~^^^ shared reference to mutable static is discouraged [static_mut_refs]
-}