Closed
Description
On parse error of the fields of an enum variant, we also emit an error about "non-existing" fields when using the variant. We have no way of actually knowing wether those fields exist, we should elide the second error:
error: expected `:`, found `,`
--> src/librustc/traits/mod.rs:228:37
|
228 | MatchExpressionArmPattern { span, ty: Ty<'tcx> },
| ^ expected `:`
error[E0026]: variant `traits::ObligationCauseCode::MatchExpressionArmPattern` does not have fields named `span`, `ty`
--> src/librustc/infer/error_reporting/mod.rs:464:62
|
464 | ObligationCauseCode::MatchExpressionArmPattern { span, ty } => {
| ^^^^ ^^ variant `traits::ObligationCauseCode::MatchExpressionArmPattern` does not have these fields