1 error[E0658]: references in constants may only refer to immutable values
2 --> $DIR/issue-17718-const-bad-values.rs:1:34
4 LL | const C1: &'static mut [usize] = &mut [];
5 | ^^^^^^^ constants require immutable values
7 = note: see issue #57349 <https://github.com/rust-lang/rust/issues/57349> for more information
8 = help: add `#![feature(const_mut_refs)]` to the crate attributes to enable
10 error[E0013]: constants cannot refer to statics
11 --> $DIR/issue-17718-const-bad-values.rs:5:46
13 LL | const C2: &'static mut usize = unsafe { &mut S };
16 = help: consider extracting the value of the `static` to a `const`, and referring to that
18 error[E0013]: constants cannot refer to statics
19 --> $DIR/issue-17718-const-bad-values.rs:5:46
21 LL | const C2: &'static mut usize = unsafe { &mut S };
24 = help: consider extracting the value of the `static` to a `const`, and referring to that
26 error[E0658]: references in constants may only refer to immutable values
27 --> $DIR/issue-17718-const-bad-values.rs:5:41
29 LL | const C2: &'static mut usize = unsafe { &mut S };
30 | ^^^^^^ constants require immutable values
32 = note: see issue #57349 <https://github.com/rust-lang/rust/issues/57349> for more information
33 = help: add `#![feature(const_mut_refs)]` to the crate attributes to enable
35 error: aborting due to 4 previous errors
37 Some errors have detailed explanations: E0013, E0658.
38 For more information about an error, try `rustc --explain E0013`.