rust/tests/ui/closures/2229_closure_analysis/diagnostics/closure-origin-tuple-diagnostics-1.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

14 lines
261 B
Rust
Raw Normal View History

2021-06-27 01:22:46 -05:00
// edition:2021
// Check that precise paths are being reported back in the error message.
fn main() {
let mut x = (5, 0);
let hello = || {
x.0 += 1;
};
let b = hello;
let c = hello; //~ ERROR use of moved value: `hello` [E0382]
}