]> git.lizzy.rs Git - rust.git/blob - src/test/ui/pattern/move-ref-patterns/issue-53840.rs
Rollup merge of #105555 - krasimirgg:llvm-int-opt-2, r=cuviper
[rust.git] / src / test / ui / pattern / move-ref-patterns / issue-53840.rs
1 // check-pass
2
3 enum E {
4     Foo(String, String, String),
5 }
6
7 struct Bar {
8     a: String,
9     b: String,
10 }
11
12 fn main() {
13     let bar = Bar { a: "1".to_string(), b: "2".to_string() };
14     match E::Foo("".into(), "".into(), "".into()) {
15         E::Foo(a, b, ref c) => {}
16     }
17     match bar {
18         Bar { a, ref b } => {}
19     }
20 }