Matching a const Range #76191
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
A-patterns
Relating to patterns and pattern matching
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
When I was doing rustlings, I found out it is possible to match with a range which is coded like this:
but when I trying to replace the range with a const,
the compiler gives error:
I have no idea why matching a literal range is possible but not matching a constant which type is RangeInclusive.
The text was updated successfully, but these errors were encountered: