summary refs log tree commit diff
path: root/tests/ui/error-codes
diff options
context:
space:
mode:
authorRalf Jung <post@ralfj.de>2024-01-05 12:18:11 +0100
committerRalf Jung <post@ralfj.de>2024-02-10 16:12:55 +0100
commit4e77e368ebc1bf21ae23137c253138c9ffbc3c7f (patch)
tree25c8fec03548477f540fc370b2aee475f9f40307 /tests/ui/error-codes
parent5f40394baa07b6fb50bc70dedd8b780524b20934 (diff)
downloadrust-4e77e368ebc1bf21ae23137c253138c9ffbc3c7f.tar.gz
rust-4e77e368ebc1bf21ae23137c253138c9ffbc3c7f.zip
unstably allow constants to refer to statics and read from immutable statics
Diffstat (limited to 'tests/ui/error-codes')
-rw-r--r--tests/ui/error-codes/E0013.rs4
-rw-r--r--tests/ui/error-codes/E0013.stderr11
2 files changed, 0 insertions, 15 deletions
diff --git a/tests/ui/error-codes/E0013.rs b/tests/ui/error-codes/E0013.rs
deleted file mode 100644
index 9b3982a785b..00000000000
--- a/tests/ui/error-codes/E0013.rs
+++ /dev/null
@@ -1,4 +0,0 @@
-static X: i32 = 42;
-const Y: i32 = X; //~ ERROR constants cannot refer to statics [E0013]
-
-fn main() {}
diff --git a/tests/ui/error-codes/E0013.stderr b/tests/ui/error-codes/E0013.stderr
deleted file mode 100644
index b07c8bdb700..00000000000
--- a/tests/ui/error-codes/E0013.stderr
+++ /dev/null
@@ -1,11 +0,0 @@
-error[E0013]: constants cannot refer to statics
-  --> $DIR/E0013.rs:2:16
-   |
-LL | const Y: i32 = X;
-   |                ^
-   |
-   = help: consider extracting the value of the `static` to a `const`, and referring to that
-
-error: aborting due to 1 previous error
-
-For more information about this error, try `rustc --explain E0013`.