2018-02-07 21:35:35 -06:00
|
|
|
// compile-flags: -Z teach
|
|
|
|
|
2016-05-12 08:17:02 -05:00
|
|
|
struct Thing {
|
|
|
|
x: u32,
|
|
|
|
y: u32
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
let thing = Thing { x: 0, y: 0 };
|
|
|
|
match thing {
|
2016-08-08 13:58:21 -05:00
|
|
|
Thing { x, y, z } => {}
|
|
|
|
//~^ ERROR struct `Thing` does not have a field named `z` [E0026]
|
2016-05-12 08:17:02 -05:00
|
|
|
}
|
|
|
|
}
|