rustc nightly (7480389 2022-08-25) gives erroneous fix advice on mismatching if-branch types #101065
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
D-invalid-suggestion
Diagnostics: A structured suggestion resulting in incorrect code.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
rustc version: rustc 1.65.0-nightly (7480389 2022-08-25)
I have a very small reproducer for a weird fix advice from rustc when the two branches of an if had a type mismatch:
This will produce the following output:
Applying this fix obviously doesn't help:
The text was updated successfully, but these errors were encountered: