rust/tests/ui/error-codes/E0026-teach.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

15 lines
251 B
Rust
Raw Normal View History

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