Skip to content

Better error messages when mixing io::Result and non io::Result #62125

@xavierd

Description

@xavierd

See the following playground: https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=98bf237ffb9961d9d598c4ed16194517

A better error message can suggest writing the nested function as: Ok(bar()?)

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-diagnosticsArea: Messages for errors, warnings, and lintsC-enhancementCategory: An issue proposing an enhancement or a PR with one.D-newcomer-roadblockDiagnostics: Confusing error or lint; hard to understand for new users.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions