Extra "type annotations needed" error after trying to constrain a non-existent type parameter with the same trait bound as another type parameter #102130
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.
Given the following code:
The current output is:
Similarly, this code:
produces
In both cases, the "type annotation needed" error (E0282 or E0284) shouldn't be shown.
Ideally, the erroneous
UUU
line should not prevent type inference from succeeding, becauseUUU
does not refer to anything. Alternatively (as in #88630, #75331, #68507) the first error could cancel the attempt at inferring types.The text was updated successfully, but these errors were encountered: