]> git.lizzy.rs Git - rust.git/blob - tests/ui/closures/2229_closure_analysis/diagnostics/closure-origin-tuple-diagnostics-1.rs
Rollup merge of #107100 - compiler-errors:issue-107087, r=lcnr
[rust.git] / tests / ui / closures / 2229_closure_analysis / diagnostics / closure-origin-tuple-diagnostics-1.rs
1 // edition:2021
2
3 // Check that precise paths are being reported back in the error message.
4
5 fn main() {
6     let mut x = (5, 0);
7     let hello = || {
8         x.0 += 1;
9     };
10
11     let b = hello;
12     let c = hello; //~ ERROR use of moved value: `hello` [E0382]
13 }