1 error[E0596]: cannot borrow immutable argument `arg` as mutable
2 --> $DIR/borrowck-argument.rs:20:5
5 | --- consider changing this to `mut arg`
6 LL | arg.mutate(); //~ ERROR: cannot borrow immutable argument
7 | ^^^ cannot borrow mutably
9 error[E0596]: cannot borrow immutable argument `arg` as mutable
10 --> $DIR/borrowck-argument.rs:25:9
12 LL | fn method(&self, arg: S) {
13 | --- consider changing this to `mut arg`
14 LL | arg.mutate(); //~ ERROR: cannot borrow immutable argument
15 | ^^^ cannot borrow mutably
17 error[E0596]: cannot borrow immutable argument `arg` as mutable
18 --> $DIR/borrowck-argument.rs:31:9
20 LL | fn default(&self, arg: S) {
21 | --- consider changing this to `mut arg`
22 LL | arg.mutate(); //~ ERROR: cannot borrow immutable argument
23 | ^^^ cannot borrow mutably
25 error[E0596]: cannot borrow immutable argument `arg` as mutable
26 --> $DIR/borrowck-argument.rs:42:17
28 LL | (|arg: S| { arg.mutate() })(s); //~ ERROR: cannot borrow immutable argument
29 | --- ^^^ cannot borrow mutably
31 | consider changing this to `mut arg`
33 error: aborting due to 4 previous errors
35 For more information about this error, try `rustc --explain E0596`.