]> git.proxmox.com Git - rustc.git/blob - src/test/ui/closures/2229_closure_analysis/diagnostics/union.stderr
New upstream version 1.66.0+dfsg1
[rustc.git] / src / test / ui / closures / 2229_closure_analysis / diagnostics / union.stderr
1 error[E0506]: cannot assign to `a.y` because it is borrowed
2 --> $DIR/union.rs:20:5
3 |
4 LL | let mut c = || {
5 | -- borrow of `a.y` occurs here
6 ...
7 LL | let _ = &mut a;
8 | - borrow occurs due to use in closure
9 ...
10 LL | a.y = 1;
11 | ^^^^^^^ assignment to borrowed `a.y` occurs here
12 ...
13 LL | c();
14 | - borrow later used here
15
16 error: aborting due to previous error
17
18 For more information about this error, try `rustc --explain E0506`.