]> git.proxmox.com Git - rustc.git/blame - src/test/ui/closures/2229_closure_analysis/diagnostics/borrowck/borrowck-1.stderr
New upstream version 1.55.0+dfsg1
[rustc.git] / src / test / ui / closures / 2229_closure_analysis / diagnostics / borrowck / borrowck-1.stderr
CommitLineData
17df50a5 1error[E0499]: cannot borrow `p` as mutable more than once at a time
136023e0 2 --> $DIR/borrowck-1.rs:12:17
17df50a5
XL
3 |
4LL | let y = &mut p.y;
5 | -------- first mutable borrow occurs here
6LL | let mut c = || {
7 | ^^ second mutable borrow occurs here
8LL |
9LL | let x = &mut p.x;
10 | --- capture is mutable because of use here
11LL | println!("{:?}", p);
12 | - second borrow occurs due to use of `p` in closure
13...
14LL | *y+=1;
15 | ----- first borrow later used here
16
136023e0 17error: aborting due to previous error
17df50a5
XL
18
19For more information about this error, try `rustc --explain E0499`.