]> git.lizzy.rs Git - rust.git/blob - src/test/ui/error-codes/E0026-teach.rs
Suggest `if let`/`let_else` for refutable pat in `let`
[rust.git] / src / test / ui / error-codes / E0026-teach.rs
1 // compile-flags: -Z teach
2
3 struct Thing {
4     x: u32,
5     y: u32
6 }
7
8 fn main() {
9     let thing = Thing { x: 0, y: 0 };
10     match thing {
11         Thing { x, y, z } => {}
12         //~^ ERROR struct `Thing` does not have a field named `z` [E0026]
13     }
14 }