fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1error[E0596]: cannot borrow `arg` as mutable, as it is not declared as mutable 2 --> $DIR/borrowck-argument.rs:10:5 3 | 4LL | arg.mutate(); 5 | ^^^ cannot borrow as mutable 6 | 7help: consider changing this to be mutable 8 | 9LL | fn func(mut arg: S) { 10 | +++ 11 12error[E0596]: cannot borrow `arg` as mutable, as it is not declared as mutable 13 --> $DIR/borrowck-argument.rs:15:9 14 | 15LL | arg.mutate(); 16 | ^^^ cannot borrow as mutable 17 | 18help: consider changing this to be mutable 19 | 20LL | fn method(&self, mut arg: S) { 21 | +++ 22 23error[E0596]: cannot borrow `arg` as mutable, as it is not declared as mutable 24 --> $DIR/borrowck-argument.rs:21:9 25 | 26LL | arg.mutate(); 27 | ^^^ cannot borrow as mutable 28 | 29help: consider changing this to be mutable 30 | 31LL | fn default(&self, mut arg: S) { 32 | +++ 33 34error[E0596]: cannot borrow `arg` as mutable, as it is not declared as mutable 35 --> $DIR/borrowck-argument.rs:32:17 36 | 37LL | (|arg: S| { arg.mutate() })(s); 38 | ^^^ cannot borrow as mutable 39 | 40help: consider changing this to be mutable 41 | 42LL | (|mut arg: S| { arg.mutate() })(s); 43 | +++ 44 45error: aborting due to 4 previous errors 46 47For more information about this error, try `rustc --explain E0596`.