]> git.lizzy.rs Git - rust.git/blob - src/test/ui/suggestions/field-access.stderr
Suggest accessing field when code compiles with it
[rust.git] / src / test / ui / suggestions / field-access.stderr
1 error[E0308]: mismatched types
2   --> $DIR/field-access.rs:12:12
3    |
4 LL |     Fst,
5    |     --- unit variant defined here
6 ...
7 LL |     if let B::Fst = a {};
8    |            ^^^^^^   - this expression has type `A`
9    |            |
10    |            expected struct `A`, found enum `B`
11    |
12 help: you might have meant to use field `b` of type `B`
13    |
14 LL |     if let B::Fst = a.b {};
15    |                     ^^^
16
17 error: aborting due to previous error
18
19 For more information about this error, try `rustc --explain E0308`.