Inconsistent handling of associated constants in patterns #72602
Labels
A-associated-items
Area: Associated items (types, constants & functions)
A-patterns
Relating to patterns and pattern matching
C-bug
Category: This is a bug.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
The following code compiles:
but adding a trait bound of
Foo
tobar
:causes compilation to fail with:
I would expect these two cases to behave identically instead of one working and the other failing. (it seems like both cases should be disallowed, but I don't have a good grasp of the current state of relevant features)
This is reproducible in the rust playground on the stable, beta, and nightly channels
The text was updated successfully, but these errors were encountered: