fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1error[E0499]: cannot borrow `*self` as mutable more than once at a time 2 --> $DIR/suggest-local-var-double-mut.rs:12:22 3 | 4LL | self.foo(self.bar()); 5 | ---- --- ^^^^ second mutable borrow occurs here 6 | | | 7 | | first borrow later used by call 8 | first mutable borrow occurs here 9 | 10help: try adding a local storing this argument... 11 --> $DIR/suggest-local-var-double-mut.rs:12:22 12 | 13LL | self.foo(self.bar()); 14 | ^^^^^^^^^^ 15help: ...and then using that local as the argument to this call 16 --> $DIR/suggest-local-var-double-mut.rs:12:13 17 | 18LL | self.foo(self.bar()); 19 | ^^^^^^^^^^^^^^^^^^^^ 20 21error[E0499]: cannot borrow `*self` as mutable more than once at a time 22 --> $DIR/suggest-local-var-double-mut.rs:24:39 23 | 24LL | Self::foo(self, Self::bar(self)); 25 | --------- ---- ^^^^ second mutable borrow occurs here 26 | | | 27 | | first mutable borrow occurs here 28 | first borrow later used by call 29 | 30help: try adding a local storing this argument... 31 --> $DIR/suggest-local-var-double-mut.rs:24:29 32 | 33LL | Self::foo(self, Self::bar(self)); 34 | ^^^^^^^^^^^^^^^ 35help: ...and then using that local as the argument to this call 36 --> $DIR/suggest-local-var-double-mut.rs:24:13 37 | 38LL | Self::foo(self, Self::bar(self)); 39 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 40 41error: aborting due to 2 previous errors 42 43For more information about this error, try `rustc --explain E0499`.