From 4e77e368ebc1bf21ae23137c253138c9ffbc3c7f Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Fri, 5 Jan 2024 12:18:11 +0100 Subject: unstably allow constants to refer to statics and read from immutable statics --- compiler/rustc_error_codes/src/error_codes/E0013.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'compiler/rustc_error_codes/src') diff --git a/compiler/rustc_error_codes/src/error_codes/E0013.md b/compiler/rustc_error_codes/src/error_codes/E0013.md index 5605302772f..9f4848343ff 100644 --- a/compiler/rustc_error_codes/src/error_codes/E0013.md +++ b/compiler/rustc_error_codes/src/error_codes/E0013.md @@ -1,9 +1,11 @@ +#### Note: this error code is no longer emitted by the compiler + Static and const variables can refer to other const variables. But a const variable cannot refer to a static variable. Erroneous code example: -```compile_fail,E0013 +```compile_fail,E0658 static X: i32 = 42; const Y: i32 = X; ``` -- cgit 1.4.1-3-g733a5