Skip to content

Type inference can't resolve through Result::map_err #67894

@smmalis37

Description

@smmalis37

I would expect all 4 of these functions to compile, but the second one apparently doesn't have enough type information, despite it looking logically equivalent to the first (to me anyways).

https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=1d3fa8810715f720dd3f6c09e8db534f

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-inferenceArea: Type inferenceC-enhancementCategory: An issue proposing an enhancement or a PR with one.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.T-langRelevant to the language team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions