summaryrefslogtreecommitdiffstats
path: root/src/test/ui/closures/2229_closure_analysis/diagnostics/closure-origin-tuple-diagnostics-1.rs
blob: dc3a57ae793e7c71ed33c76db2d381fdb157f6e3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
// 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]
}