]> git.lizzy.rs Git - rust.git/blob - src/test/ui/suggestions/field-access.rs
Suggest accessing field when code compiles with it
[rust.git] / src / test / ui / suggestions / field-access.rs
1 struct A {
2     b: B,
3 }
4
5 enum B {
6     Fst,
7     Snd,
8 }
9
10 fn main() {
11     let a = A { b: B::Fst };
12     if let B::Fst = a {};
13     //~^ ERROR mismatched types [E0308]
14     // note: you might have meant to use field `b` of type `B`
15 }