fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1error[E0764]: mutable references are not allowed in the final value of constants 2 --> $DIR/issue-76510.rs:5:29 3 | 4LL | const S: &'static mut str = &mut " hello "; 5 | ^^^^^^^^^^^^^^ 6 7error[E0658]: mutation through a reference is not allowed in constants 8 --> $DIR/issue-76510.rs:5:29 9 | 10LL | const S: &'static mut str = &mut " hello "; 11 | ^^^^^^^^^^^^^^ 12 | 13 = note: see issue #57349 <https://github.com/rust-lang/rust/issues/57349> for more information 14 = help: add `#![feature(const_mut_refs)]` to the crate attributes to enable 15 16error[E0596]: cannot borrow data in a `&` reference as mutable 17 --> $DIR/issue-76510.rs:5:29 18 | 19LL | const S: &'static mut str = &mut " hello "; 20 | ^^^^^^^^^^^^^^ cannot borrow as mutable 21 22error: aborting due to 3 previous errors 23 24Some errors have detailed explanations: E0596, E0658, E0764. 25For more information about an error, try `rustc --explain E0596`.