Closed
Description
With a single typo in a match arm, we generate three separate errors:
error[E0425]: cannot find value `func` in this scope
-->
|
125 | Target::Match { ref attr, ref fung} => func.apply(&value, &attr.value)?,
| ^^^^ did you mean `fung`?
error[E0026]: variant `internal::Target::Match` does not have a field named `fung`
-->
|
125 | Target::Match { ref attr, ref fung} => func.apply(&value, &attr.value)?,
| ^^^^^^^^ variant `internal::Target::Match` does not have this field
error[E0027]: pattern does not mention field `func`
-->
|
125 | Target::Match { ref attr, ref fung} => func.apply(&value, &attr.value)?,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing field `func`
We should collect all these errors into a single diagnostic:
error[E0026]: variant `internal::Target::Match` does not have a field named `fung`
-->
|
125 | Target::Match { ref attr, ref fung} => func.apply(&value, &attr.value)?,
| ^^^^^^^^
| |
| variant `internal::Target::Match` does not have this field
| help: did you mean: `func`