summaryrefslogtreecommitdiffstats
path: root/src/test/ui/nll/ref-suggestion.rs
blob: 346d118f0f9a9dd91140c4442cefcaf195ba2c4b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
fn main() {
    let x = vec![1];
    let y = x;
    x; //~ ERROR use of moved value

    let x = vec![1];
    let mut y = x;
    x; //~ ERROR use of moved value

    let x = (Some(vec![1]), ());

    match x {
        (Some(y), ()) => {},
        _ => {},
    }
    x; //~ ERROR use of partially moved value
}