diff options
| author | Esteban Küber <esteban@kuber.com.ar> | 2025-08-24 19:22:51 +0000 | 
|---|---|---|
| committer | Esteban Küber <esteban@kuber.com.ar> | 2025-08-25 15:16:25 +0000 | 
| commit | 8dbdb1760b23112f87aedad37e4dad97559bc750 (patch) | |
| tree | dd2cd17a9704e56eac5416f6c5c9883ebd6deaf5 /compiler/rustc_resolve/messages.ftl | |
| parent | 41a79f1862aa6b81bac674598e275e80e9f09eb9 (diff) | |
| download | rust-8dbdb1760b23112f87aedad37e4dad97559bc750.tar.gz rust-8dbdb1760b23112f87aedad37e4dad97559bc750.zip | |
On binding not present in all patterns, suggest potential typo
```
error[E0408]: variable `Ban` is not bound in all patterns
 --> f12.rs:9:9
  |
9 |         (Foo,Bar)|(Ban,Foo) => {}
  |         ^^^^^^^^^  --- variable not in all patterns
  |         |
  |         pattern doesn't bind `Ban`
  |
help: you might have meant to use the similarly named previously used binding `Bar`
  |
9 -         (Foo,Bar)|(Ban,Foo) => {}
9 +         (Foo,Bar)|(Bar,Foo) => {}
  |
```
Diffstat (limited to 'compiler/rustc_resolve/messages.ftl')
| -rw-r--r-- | compiler/rustc_resolve/messages.ftl | 2 | 
1 files changed, 2 insertions, 0 deletions
| diff --git a/compiler/rustc_resolve/messages.ftl b/compiler/rustc_resolve/messages.ftl index 47280a93677..0e566e20a12 100644 --- a/compiler/rustc_resolve/messages.ftl +++ b/compiler/rustc_resolve/messages.ftl @@ -470,6 +470,8 @@ resolve_variable_bound_with_different_mode = .label = bound in different ways .first_binding_span = first binding +resolve_variable_is_a_typo = you might have meant to use the similarly named previously used binding `{$typo}` + resolve_variable_is_not_bound_in_all_patterns = variable `{$name}` is not bound in all patterns | 
