Esteban Küber 00f6fe1b6c On unused binding in pattern, suggest unit struct/variant with similar name
When encountering a typo in a pattern that gets interpreted as an unused binding, look for unit struct/variant of the same type as the binding:

```
error: unused variable: `Non`
  --> $DIR/binding-typo-2.rs:36:9
   |
LL |         Non => {}
   |         ^^^
   |
help: if this is intentional, prefix it with an underscore
   |
LL |         _Non => {}
   |         +
help: you might have meant to pattern match on the similarly named variant `None`
   |
LL -         Non => {}
LL +         std::prelude::v1::None => {}
   |
```
2025-08-30 16:24:26 +00:00
..
2025-07-05 00:39:50 +05:00
2025-07-31 21:25:49 +05:00