rust/src/test/ui/mut/mut-suggestion.stderr

22 lines
625 B
Plaintext
Raw Normal View History

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) {
| --- 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;
| ----- 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`.