fork/rust
git clone https://git.julia.blue/fork/rust
49cae55760d
1.44.0
1error[E0658]: references in constants may only refer to immutable values 2 --> $DIR/issue-17718-const-bad-values.rs:1:34 3 | 4LL | const C1: &'static mut [usize] = &mut []; 5 | ^^^^^^^ constants require immutable values 6 | 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 9 10error[E0013]: constants cannot refer to statics 11 --> $DIR/issue-17718-const-bad-values.rs:5:46 12 | 13LL | const C2: &'static mut usize = unsafe { &mut S }; 14 | ^ 15 | 16 = help: consider extracting the value of the `static` to a `const`, and referring to that 17 18error[E0013]: constants cannot refer to statics 19 --> $DIR/issue-17718-const-bad-values.rs:5:46 20 | 21LL | const C2: &'static mut usize = unsafe { &mut S }; 22 | ^ 23 | 24 = help: consider extracting the value of the `static` to a `const`, and referring to that 25 26error[E0658]: references in constants may only refer to immutable values 27 --> $DIR/issue-17718-const-bad-values.rs:5:41 28 | 29LL | const C2: &'static mut usize = unsafe { &mut S }; 30 | ^^^^^^ constants require immutable values 31 | 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 34 35error: aborting due to 4 previous errors 36 37Some errors have detailed explanations: E0013, E0658. 38For more information about an error, try `rustc --explain E0013`.