"if
may be missing an else
clause" sometimes reverses expectations
#102397
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
D-papercut
Diagnostics: An error or lint that needs small tweaks.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Given the following code:
https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=5a939f14b1d92d9d4b3a3edbbb46f5c0
The current output is:
Note how the expected and found types are reversed for the
missing_else_nested
error and how the note about the function's return type is gone, compared to themissing_else
error.Ideally the output for the
missing_else_nested
error should be similar to the error formissing_else
:This kinda duplicates #78656, but @estebank asked me to file a new issue on Twitter.
The text was updated successfully, but these errors were encountered: