Skip to content

Conversation

estebank
Copy link
Contributor

@estebank estebank commented Aug 24, 2025

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) => {}
  |

Fix #51976.

@rustbot
Copy link
Collaborator

rustbot commented Aug 24, 2025

r? @fee1-dead

rustbot has assigned @fee1-dead.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Aug 24, 2025
@rust-log-analyzer

This comment has been minimized.

```
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) => {}
  |
```
@fee1-dead
Copy link
Member

Hmmm. I'm not entirely sure whether this actually fixes the original issue as the original issue is about a variant in scope. I would like to see the original issue in a test.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Diagnostic error[E0408]: variable ... is not bound in all patterns should be more helpful with typos.
4 participants