]> git.lizzy.rs Git - rust.git/blob - src/test/ui/borrowck/borrowck-ref-mut-of-imm.stderr
Rollup merge of #102245 - ink-feather-org:const_cmp_by, r=fee1-dead
[rust.git] / src / test / ui / borrowck / borrowck-ref-mut-of-imm.stderr
1 error[E0596]: cannot borrow `x.0` as mutable, as `x` is not declared as mutable
2   --> $DIR/borrowck-ref-mut-of-imm.rs:4:12
3    |
4 LL | fn destructure(x: Option<isize>) -> isize {
5    |                - help: consider changing this to be mutable: `mut x`
6 ...
7 LL |       Some(ref mut v) => *v
8    |            ^^^^^^^^^ cannot borrow as mutable
9
10 error: aborting due to previous error
11
12 For more information about this error, try `rustc --explain E0596`.