]> git.lizzy.rs Git - rust.git/blob - src/test/ui/borrowck/two-phase-cannot-nest-mut-self-calls.stderr
Auto merge of #87284 - Aaron1011:remove-paren-special, r=petrochenkov
[rust.git] / src / test / ui / borrowck / two-phase-cannot-nest-mut-self-calls.stderr
1 error[E0502]: cannot borrow `vec` as mutable because it is also borrowed as immutable
2   --> $DIR/two-phase-cannot-nest-mut-self-calls.rs:16:9
3    |
4 LL |     vec.get({
5    |     --- --- immutable borrow later used by call
6    |     |
7    |     immutable borrow occurs here
8 LL | 
9 LL |         vec.push(2);
10    |         ^^^ mutable borrow occurs here
11
12 error: aborting due to previous error
13
14 For more information about this error, try `rustc --explain E0502`.