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