2020-01-18 19:47:01 -06:00
|
|
|
// check-pass
|
|
|
|
|
2018-10-02 00:51:02 -05:00
|
|
|
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 {
|
2020-01-18 19:47:01 -06:00
|
|
|
Bar { a, ref b } => {}
|
2018-10-02 00:51:02 -05:00
|
|
|
}
|
|
|
|
}
|