2021-01-29 05:43:35 +09:00
|
|
|
error[E0308]: mismatched types
|
2021-01-29 16:33:15 +09:00
|
|
|
--> $DIR/field-access.rs:15:12
|
2021-01-29 05:43:35 +09:00
|
|
|
|
|
|
|
|
LL | Fst,
|
|
|
|
| --- unit variant defined here
|
|
|
|
...
|
|
|
|
LL | if let B::Fst = a {};
|
|
|
|
| ^^^^^^ - this expression has type `A`
|
|
|
|
| |
|
|
|
|
| expected struct `A`, found enum `B`
|
|
|
|
|
|
|
|
|
help: you might have meant to use field `b` of type `B`
|
|
|
|
|
|
|
|
|
LL | if let B::Fst = a.b {};
|
|
|
|
| ^^^
|
|
|
|
|
2021-01-29 16:28:53 +09:00
|
|
|
error[E0308]: mismatched types
|
2021-01-30 13:42:01 +09:00
|
|
|
--> $DIR/field-access.rs:20:9
|
2021-01-29 16:28:53 +09:00
|
|
|
|
|
|
|
|
LL | Fst,
|
|
|
|
| --- unit variant defined here
|
|
|
|
...
|
|
|
|
LL | match a {
|
|
|
|
| - this expression has type `A`
|
2021-01-30 13:42:01 +09:00
|
|
|
...
|
2021-01-29 16:28:53 +09:00
|
|
|
LL | B::Fst => (),
|
|
|
|
| ^^^^^^ expected struct `A`, found enum `B`
|
|
|
|
|
|
|
|
|
help: you might have meant to use field `b` of type `B`
|
|
|
|
|
|
|
|
|
LL | match a.b {
|
|
|
|
| ^^^
|
|
|
|
|
|
|
|
error[E0308]: mismatched types
|
2021-01-30 13:42:01 +09:00
|
|
|
--> $DIR/field-access.rs:21:9
|
2021-01-29 16:28:53 +09:00
|
|
|
|
|
|
|
|
LL | Snd,
|
|
|
|
| --- unit variant defined here
|
|
|
|
...
|
|
|
|
LL | match a {
|
|
|
|
| - this expression has type `A`
|
2021-01-30 13:42:01 +09:00
|
|
|
...
|
2021-01-29 16:28:53 +09:00
|
|
|
LL | B::Snd => (),
|
|
|
|
| ^^^^^^ expected struct `A`, found enum `B`
|
|
|
|
|
|
|
|
|
help: you might have meant to use field `b` of type `B`
|
|
|
|
|
|
|
|
|
LL | match a.b {
|
|
|
|
| ^^^
|
|
|
|
|
|
|
|
error: aborting due to 3 previous errors
|
2021-01-29 05:43:35 +09:00
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0308`.
|