]> git.lizzy.rs Git - rust.git/blob - tests/ui/mut/mut-suggestion.stderr
Rollup merge of #106805 - madsravn:master, r=compiler-errors
[rust.git] / tests / ui / mut / mut-suggestion.stderr
1 error[E0596]: cannot borrow `arg` as mutable, as it is not declared as mutable
2   --> $DIR/mut-suggestion.rs:12:5
3    |
4 LL |     arg.mutate();
5    |     ^^^^^^^^^^^^ cannot borrow as mutable
6    |
7 help: consider changing this to be mutable
8    |
9 LL | fn func(mut arg: S) {
10    |         +++
11
12 error[E0596]: cannot borrow `local` as mutable, as it is not declared as mutable
13   --> $DIR/mut-suggestion.rs:20:5
14    |
15 LL |     local.mutate();
16    |     ^^^^^^^^^^^^^^ cannot borrow as mutable
17    |
18 help: consider changing this to be mutable
19    |
20 LL |     let mut local = S;
21    |         +++
22
23 error: aborting due to 2 previous errors
24
25 For more information about this error, try `rustc --explain E0596`.