]> git.lizzy.rs Git - rust.git/blob - tests/ui/borrowck/two-phase-multi-mut.stderr
Rollup merge of #107306 - compiler-errors:correct-sugg-for-closure-arg-needs-borrow...
[rust.git] / tests / ui / borrowck / two-phase-multi-mut.stderr
1 error[E0499]: cannot borrow `foo` as mutable more than once at a time
2   --> $DIR/two-phase-multi-mut.rs:11:5
3    |
4 LL |     foo.method(&mut foo);
5    |     ^^^^------^--------^
6    |     |   |      |
7    |     |   |      first mutable borrow occurs here
8    |     |   first borrow later used by call
9    |     second mutable borrow occurs here
10
11 error[E0499]: cannot borrow `foo` as mutable more than once at a time
12   --> $DIR/two-phase-multi-mut.rs:11:16
13    |
14 LL |     foo.method(&mut foo);
15    |     -----------^^^^^^^^-
16    |     |   |      |
17    |     |   |      second mutable borrow occurs here
18    |     |   first borrow later used by call
19    |     first mutable borrow occurs here
20
21 error: aborting due to 2 previous errors
22
23 For more information about this error, try `rustc --explain E0499`.