fork/rust

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

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
888 B26 linesraw
1error[E0596]: cannot borrow `x[..]` as mutable, as `x` is not declared as mutable
2  --> $DIR/array_subslice.rs:7:21
3   |
4LL | pub fn subslice_array(x: [u8; 3]) {
5   |                       - help: consider changing this to be mutable: `mut x`
6...
7LL |         let [ref y, ref mut z @ ..] = x;
8   |                     ^^^^^^^^^ cannot borrow as mutable
9
10error[E0596]: cannot borrow `f` as mutable, as it is not declared as mutable
11  --> $DIR/array_subslice.rs:10:5
12   |
13LL |         let [ref y, ref mut z @ ..] = x;
14   |                                       - calling `f` requires mutable binding due to mutable borrow of `x`
15...
16LL |     f();
17   |     ^ cannot borrow as mutable
18   |
19help: consider changing this to be mutable
20   |
21LL |     let mut f = || {
22   |         +++
23
24error: aborting due to 2 previous errors
25
26For more information about this error, try `rustc --explain E0596`.