summaryrefslogtreecommitdiffstats
path: root/src/test/ui/pattern/move-ref-patterns/issue-53840.rs
blob: 80effc497ed93ae75c323ce344417b671d68ab2a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// check-pass

enum E {
    Foo(String, String, String),
}

struct Bar {
    a: String,
    b: String,
}

fn main() {
    let bar = Bar { a: "1".to_string(), b: "2".to_string() };
    match E::Foo("".into(), "".into(), "".into()) {
        E::Foo(a, b, ref c) => {}
    }
    match bar {
        Bar { a, ref b } => {}
    }
}