fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #68568 - pietroalbini:stable-next, r=pietroalbini5e1a799842b

1.41.0
527 B12 linesraw
1error[E0596]: cannot borrow `*x` as mutable, as it is behind a `&` reference
2  --> $DIR/slice-mut-2.rs:7:18
3   |
4LL |     let x: &[isize] = &[1, 2, 3, 4, 5];
5   |                       ---------------- help: consider changing this to be a mutable reference: `&mut [1, 2, 3, 4, 5]`
6...
7LL |     let _ = &mut x[2..4];
8   |                  ^ `x` is a `&` reference, so the data it refers to cannot be borrowed as mutable
9
10error: aborting due to previous error
11
12For more information about this error, try `rustc --explain E0596`.