]> git.lizzy.rs Git - rust.git/blob - src/test/ui/regions/regions-adjusted-lvalue-op.nll.stderr
Auto merge of #54720 - davidtwco:issue-51191, r=nikomatsakis
[rust.git] / src / test / ui / regions / regions-adjusted-lvalue-op.nll.stderr
1 error[E0502]: cannot borrow `v` as immutable because it is also borrowed as mutable
2   --> $DIR/regions-adjusted-lvalue-op.rs:24:16
3    |
4 LL |     v[0].oh_no(&v); //~ ERROR cannot borrow `v` as immutable because
5    |     -----------^^-
6    |     |          |
7    |     |          immutable borrow occurs here
8    |     mutable borrow occurs here
9    |     borrow later used here
10
11 error[E0502]: cannot borrow `v` as immutable because it is also borrowed as mutable
12   --> $DIR/regions-adjusted-lvalue-op.rs:25:16
13    |
14 LL |     (*v).oh_no(&v); //~ ERROR cannot borrow `v` as immutable because
15    |     -----------^^-
16    |     | |        |
17    |     | |        immutable borrow occurs here
18    |     | mutable borrow occurs here
19    |     borrow later used here
20
21 error: aborting due to 2 previous errors
22
23 For more information about this error, try `rustc --explain E0502`.