]> git.lizzy.rs Git - rust.git/blob - src/test/ui/error-codes/E0451.rs
Suggest `if let`/`let_else` for refutable pat in `let`
[rust.git] / src / test / ui / error-codes / E0451.rs
1 mod bar {
2     pub struct Foo {
3         pub a: isize,
4         b: isize,
5     }
6
7     pub struct FooTuple (
8         pub isize,
9         isize,
10     );
11 }
12
13 fn pat_match(foo: bar::Foo) {
14     let bar::Foo{a, b} = foo; //~ ERROR E0451
15 }
16
17 fn main() {
18     let f = bar::Foo{ a: 0, b: 0 }; //~ ERROR E0451
19 }