1 error[E0596]: cannot borrow `arg` as mutable, as it is not declared as mutable
2 --> $DIR/borrowck-argument.rs:10:5
5 | ^^^^^^^^^^^^ cannot borrow as mutable
7 help: consider changing this to be mutable
9 LL | fn func(mut arg: S) {
12 error[E0596]: cannot borrow `arg` as mutable, as it is not declared as mutable
13 --> $DIR/borrowck-argument.rs:15:9
16 | ^^^^^^^^^^^^ cannot borrow as mutable
18 help: consider changing this to be mutable
20 LL | fn method(&self, mut arg: S) {
23 error[E0596]: cannot borrow `arg` as mutable, as it is not declared as mutable
24 --> $DIR/borrowck-argument.rs:21:9
27 | ^^^^^^^^^^^^ cannot borrow as mutable
29 help: consider changing this to be mutable
31 LL | fn default(&self, mut arg: S) {
34 error[E0596]: cannot borrow `arg` as mutable, as it is not declared as mutable
35 --> $DIR/borrowck-argument.rs:32:17
37 LL | (|arg: S| { arg.mutate() })(s);
38 | ^^^^^^^^^^^^ cannot borrow as mutable
40 help: consider changing this to be mutable
42 LL | (|mut arg: S| { arg.mutate() })(s);
45 error: aborting due to 4 previous errors
47 For more information about this error, try `rustc --explain E0596`.