about summary refs log tree commit diff
path: root/src/librustc_error_codes/error_codes
diff options
context:
space:
mode:
authorChristian Poveda <christianpoveda@protonmail.com>2019-11-29 21:54:27 -0500
committerChristian Poveda <christianpoveda@protonmail.com>2019-12-02 09:46:27 -0500
commite01ad6a01abce35f59543bf38a280a05eb7f6929 (patch)
tree96cb1d76f4175091eb28575270e2d25470df9b21 /src/librustc_error_codes/error_codes
parent416b439ffbdf6840bb3c663fea0246d3ead9a5dc (diff)
downloadrust-e01ad6a01abce35f59543bf38a280a05eb7f6929.tar.gz
rust-e01ad6a01abce35f59543bf38a280a05eb7f6929.zip
Remove E0017 from error codes index
Diffstat (limited to 'src/librustc_error_codes/error_codes')
-rw-r--r--src/librustc_error_codes/error_codes/E0017.md20
1 files changed, 0 insertions, 20 deletions
diff --git a/src/librustc_error_codes/error_codes/E0017.md b/src/librustc_error_codes/error_codes/E0017.md
deleted file mode 100644
index d5e6857b4d6..00000000000
--- a/src/librustc_error_codes/error_codes/E0017.md
+++ /dev/null
@@ -1,20 +0,0 @@
-References in statics and constants may only refer to immutable values.
-
-Erroneous code example:
-
-```compile_fail,E0017
-static X: i32 = 1;
-const C: i32 = 2;
-
-// these three are not allowed:
-const CR: &mut i32 = &mut C;
-static STATIC_REF: &'static mut i32 = &mut X;
-static CONST_REF: &'static mut i32 = &mut C;
-```
-
-Statics are shared everywhere, and if they refer to mutable data one might
-violate memory safety since holding multiple mutable references to shared data
-is not allowed.
-
-If you really want global mutable state, try using `static mut` or a global
-`UnsafeCell`.