]> git.lizzy.rs Git - rust.git/blob - tests/ui/closures/2229_closure_analysis/diagnostics/closure-origin-single-variant-diagnostics.stderr
Auto merge of #107843 - bjorn3:sync_cg_clif-2023-02-09, r=bjorn3
[rust.git] / tests / ui / closures / 2229_closure_analysis / diagnostics / closure-origin-single-variant-diagnostics.stderr
1 error[E0382]: use of moved value: `c`
2   --> $DIR/closure-origin-single-variant-diagnostics.rs:17:13
3    |
4 LL |     let b = c;
5    |             - value moved here
6 LL |     let a = c;
7    |             ^ value used here after move
8    |
9 note: closure cannot be moved more than once as it is not `Copy` due to moving the variable `point.0` out of its environment
10   --> $DIR/closure-origin-single-variant-diagnostics.rs:12:50
11    |
12 LL |         let SingleVariant::Point(ref mut x, _) = point;
13    |                                                  ^^^^^
14 help: consider mutably borrowing `c`
15    |
16 LL |     let b = &mut c;
17    |             ++++
18
19 error: aborting due to previous error
20
21 For more information about this error, try `rustc --explain E0382`.