]> git.lizzy.rs Git - rust.git/blob - src/test/ui/error-codes/E0609.rs
Suggest `if let`/`let_else` for refutable pat in `let`
[rust.git] / src / test / ui / error-codes / E0609.rs
1 struct Foo {
2     x: u32,
3 }
4 struct Bar;
5
6 fn main() {
7     let x = Foo { x: 0 };
8     let _ = x.foo; //~ ERROR E0609
9
10     let y = Bar;
11     y.1; //~ ERROR E0609
12 }