]> git.proxmox.com Git - rustc.git/blame - src/test/ui/borrowck/borrowck-loan-vec-content.nll.stderr
New upstream version 1.31.0~beta.4+dfsg1
[rustc.git] / src / test / ui / borrowck / borrowck-loan-vec-content.nll.stderr
CommitLineData
b7449926
XL
1error[E0502]: cannot borrow `v` as mutable because it is also borrowed as immutable
2 --> $DIR/borrowck-loan-vec-content.rs:28:9
3 |
0bf4aa26
XL
4LL | takes_imm_elt(
5 | ------------- immutable borrow later used by call
6LL | &v[0],
7 | - immutable borrow occurs here
8LL | || { //~ ERROR cannot borrow `v` as mutable
9 | ^^ mutable borrow occurs here
10LL | v[1] = 4;
11 | - second borrow occurs due to use of `v` in closure
b7449926
XL
12
13error: aborting due to previous error
14
15For more information about this error, try `rustc --explain E0502`.