]>
Commit | Line | Data |
---|---|---|
2c00a5a8 XL |
1 | // compile-flags: -Z teach |
2 | ||
a7813a04 XL |
3 | struct Dog { |
4 | name: String, | |
5 | age: u32, | |
6 | } | |
7 | ||
8 | fn main() { | |
9 | let d = Dog { name: "Rusty".to_string(), age: 8 }; | |
10 | ||
11 | match d { | |
5bcae85e SL |
12 | Dog { age: x } => {} |
13 | //~^ ERROR pattern does not mention field `name` | |
54a0048b SL |
14 | } |
15 | } |