2018-08-08 07:28:26 -05:00
|
|
|
error[E0596]: cannot borrow immutable argument `arg` as mutable
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/mut-suggestion.rs:12:5
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
|
LL | fn func(arg: S) {
|
2018-09-12 13:13:40 -05:00
|
|
|
| --- help: make this binding mutable: `mut arg`
|
|
|
|
...
|
2018-08-08 07:28:26 -05:00
|
|
|
LL | arg.mutate();
|
|
|
|
| ^^^ cannot borrow mutably
|
|
|
|
|
|
|
|
error[E0596]: cannot borrow immutable local variable `local` as mutable
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/mut-suggestion.rs:21:5
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
|
LL | let local = S;
|
2018-09-12 13:13:40 -05:00
|
|
|
| ----- help: make this binding mutable: `mut local`
|
|
|
|
...
|
2018-08-08 07:28:26 -05:00
|
|
|
LL | local.mutate();
|
|
|
|
| ^^^^^ cannot borrow mutably
|
|
|
|
|
|
|
|
error: aborting due to 2 previous errors
|
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0596`.
|