Error message flips expected and actual types in E0271 note #131763
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Code
Current output
Desired output
Rationale and extra context
The note section in error message for E0271 mixes up the expected and actual types. In the example, the error message incorrectly states that the iterator is expected to yield Rc<SomeOtherStruct> but actually yields Rc. It should state that the iterator is expected to yield Rc but actually yields Rc<SomeOtherStruct>.
The LSP highlighting for the error makes understanding the actual problem quite confusing

Other cases
No response
Rust Version
Anything else?
No response
The text was updated successfully, but these errors were encountered: