Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
xavierd opened this issue Jun 25, 2019 · 1 comment
Closed

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

xavierd opened this issue Jun 25, 2019 · 1 comment
Labels
A-diagnostics Area: Messages for errors, warnings, and lints C-enhancement Category: An issue proposing an enhancement or a PR with one. D-newcomer-roadblock Diagnostics: Confusing error or lint; hard to understand for new users. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@xavierd
Copy link

xavierd commented Jun 25, 2019

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()?)

@jonas-schievink jonas-schievink added A-diagnostics Area: Messages for errors, warnings, and lints 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. labels Jun 25, 2019
@estebank estebank added the D-newcomer-roadblock Diagnostics: Confusing error or lint; hard to understand for new users. label Aug 11, 2020
@estebank
Copy link
Contributor

estebank commented Jan 5, 2023

Duplicate of #47560

@estebank estebank marked this as a duplicate of #47560 Jan 5, 2023
@estebank estebank closed this as completed Jan 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-diagnostics Area: Messages for errors, warnings, and lints C-enhancement Category: An issue proposing an enhancement or a PR with one. D-newcomer-roadblock Diagnostics: Confusing error or lint; hard to understand for new users. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

3 participants