confusing error: "expected associated type" and "found associated type" are the same in some cases with Fn traits #91829
Labels
A-closures
Area: Closures (`|…| { … }`)
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.
D-terse
Diagnostics: An error or lint that doesn't give enough information about the problem at hand.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Given the following code: play
The current output is:
I don't understand the issue. This part is especially confusing, because both types are the same:
I think this has to do with the Fn traits, because it doesn't happen with any other trait, so this code compiles:
Issue exists in both rustc 1.57.0 (f1edd04 2021-11-29) and rustc 1.59.0-nightly (0b42dea 2021-12-09).
The text was updated successfully, but these errors were encountered: