-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
Option map won't compile while match works well #47212
Copy link
Copy link
Open
Labels
A-coercionsArea: implicit and explicit `expr as Type` coercionsArea: implicit and explicit `expr as Type` coercionsC-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.T-langRelevant to the language teamRelevant to the language team
Metadata
Metadata
Assignees
Labels
A-coercionsArea: implicit and explicit `expr as Type` coercionsArea: implicit and explicit `expr as Type` coercionsC-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.T-langRelevant to the language teamRelevant to the language team
Type
Fields
Give feedbackNo fields configured for issues without a type.
Consider this snippet:
it won't compiles with the error:
but match in exactly same case compiles well:
And if I explicitly define closure's argument type and returning value type it also compiles well:
I am sure there should not be differences between match and map at all.
This issue is reproduceble on rust stable and nightly.