You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
…etrochenkov
Do not complain about non-existing fields after parse recovery
When failing to parse struct-like enum variants, the ADT gets recorded
as having no fields. Record that we have actually recovered during
parsing of this variant to avoid complaing about non-existing fields
when actually using it.
Fixrust-lang#57361.
…etrochenkov
Do not complain about non-existing fields after parse recovery
When failing to parse struct-like enum variants, the ADT gets recorded
as having no fields. Record that we have actually recovered during
parsing of this variant to avoid complaing about non-existing fields
when actually using it.
Fixrust-lang#57361.
Centril
added a commit
to Centril/rust
that referenced
this issue
Mar 22, 2019
…etrochenkov
Do not complain about non-existing fields after parse recovery
When failing to parse struct-like enum variants, the ADT gets recorded
as having no fields. Record that we have actually recovered during
parsing of this variant to avoid complaing about non-existing fields
when actually using it.
Fixrust-lang#57361.
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:
The text was updated successfully, but these errors were encountered: