Suggested bounds restriction suggests duplicate trait #107335
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
While the diagnostic produces valid code, I think this diagnostic could be improved. I don't think there's ever a valid scenario where a human would write
MyTrait + MyTrait<Output = T>
overMyTrait<Output = T>
.Other cases
No response
Anything else?
Reproduces on playground.
Tested on stable 1.66.1 and nightly 1.69.0-nightly (2023-01-25 c18a5e8)
The text was updated successfully, but these errors were encountered: