1 error[E0308]: mismatched types
2 --> $DIR/field-access.rs:20:12
5 | --- unit variant defined here
7 LL | if let B::Fst = a {};
8 | ^^^^^^ - this expression has type `A`
10 | expected struct `A`, found enum `B`
12 help: you might have meant to use field `b` whose type is `B`
14 LL | if let B::Fst = a.b {};
17 error[E0308]: mismatched types
18 --> $DIR/field-access.rs:25:9
21 | --- unit variant defined here
24 | - this expression has type `A`
27 | ^^^^^^ expected struct `A`, found enum `B`
29 help: you might have meant to use field `b` whose type is `B`
34 error[E0308]: mismatched types
35 --> $DIR/field-access.rs:26:9
38 | --- unit variant defined here
41 | - this expression has type `A`
44 | ^^^^^^ expected struct `A`, found enum `B`
46 help: you might have meant to use field `b` whose type is `B`
51 error[E0308]: mismatched types
52 --> $DIR/field-access.rs:32:9
55 | --- this expression has type `Foo`
58 | ^^^^ expected union `Foo`, found `u32`
60 help: you might have meant to use field `bar` whose type is `u32`
62 LL | match unsafe { foo.bar } {
65 error: aborting due to 4 previous errors
67 For more information about this error, try `rustc --explain E0308`.