diff options
| author | Esteban Küber <esteban@kuber.com.ar> | 2025-08-30 16:24:26 +0000 |
|---|---|---|
| committer | Esteban Küber <esteban@kuber.com.ar> | 2025-08-30 16:24:26 +0000 |
| commit | 00f6fe1b6cbb211c4396b306566816f91a4ed371 (patch) | |
| tree | ec70227ecaf84c69e675d493f61f8dd784bbc600 /compiler/rustc_codegen_llvm/src | |
| parent | cb9cd8f8306e6e1b16661704aed8d6f09aa5db73 (diff) | |
| download | rust-00f6fe1b6cbb211c4396b306566816f91a4ed371.tar.gz rust-00f6fe1b6cbb211c4396b306566816f91a4ed371.zip | |
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 => {}
|
```
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
0 files changed, 0 insertions, 0 deletions
