You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Closing, this is reported correctly. The name V1 is not in scope for the match statement, so it is counting as a variable binding, so the V2 branch is no longer reachable.
For a better error message, this is a dupe of #10304
…-lang#13998)
A multipart suggestion will be used whenever the method call can be
replaced by another one with the first argument removed. It helps place
the new method call in context, especially when it is part of a larger
expression.
This fixesrust-lang#13995 by applying a suggestion made by @y21.
r? @y21
changelog: [`unnecessary_map_or`]: better representation of suggestions
by placing them in context
If an enum's variants are not imported, then matching on them will give an "unreachable pattern" error instead of "unresolved name". Example:
The text was updated successfully, but these errors were encountered: