When a type parameter shadows a type name in a pattern, E0574 should point at the type parameter and check if there are other types that could be resolved with the same name and point at them as well.
It currently is
error[E0574]: expected struct, variant or union type, found type parameter `Irrelevant`
--> src/lib.rs:10:13
|
10 | Irrelevant { irrelevant } => {
| ^^^^^^^^^^ not a struct, variant or union type
and should be
error[E0574]: expected struct, variant or union type, found type parameter `Irrelevant`
--> src/lib.rs:10:13
|
3 | pub struct Irrelevant<Irrelevant> {
| ---------- you might have meant to refer to this struct
...
7 | impl<Irrelevant: Debug> Debug for Irrelevant<Irrelevant> {
| ---------- found this type parameter
...
10 | Irrelevant { irrelevant } => {
| ^^^^^^^^^^ not a struct, variant or union type
When a type parameter shadows a type name in a pattern, E0574 should point at the type parameter and check if there are other types that could be resolved with the same name and point at them as well.
It currently is
and should be