Confusing mismatched types error with the same expected/found types when universes are involved #124471
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
A-lifetimes
Area: Lifetimes / regions
D-confusing
Diagnostics: Confusing error or lint that should be reworked.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
T-types
Relevant to the types team, which will review and decide on the PR/issue.
Code
Current output
Desired output
Rationale and extra context
Emitting expected/found with the same thing is not very helpful. Ideally we would also mention why the types can't be actually equal here (
F
being a concrete type and not being able to mention the lifetime inFnOnce
), but I'm not sure how to best fit it in an error message.Other cases
No response
Rust Version
Anything else?
No response
The text was updated successfully, but these errors were encountered: