]> git.lizzy.rs Git - rust.git/blob - tests/ui/closures/2229_closure_analysis/diagnostics/union.stderr
Auto merge of #105650 - cassaundra:float-literal-suggestion, r=pnkfelix
[rust.git] / tests / 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    |                 -- `a.y` is borrowed here
6 ...
7 LL |         let _ = &mut a;
8    |                      - borrow occurs due to use in closure
9 ...
10 LL |     a.y = 1;
11    |     ^^^^^^^ `a.y` is assigned to here but it was already borrowed
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`.