Rustc suggesting to add a already existing trait bound, instead of relaxing an entirely different one #98539
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
C-bug
Category: This is a bug.
D-invalid-suggestion
Diagnostics: A structured suggestion resulting in incorrect code.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
I tried this code:
This does not compile with the following error message:
This message is misleading, instruction you to add an (possibly) already existing trait bound instead of the actual fix, which is commented out in the code
Meta
This bug currently exists both in stable 1.61.0 and nightly 1.64.0-nightly(2022-06-25 20a6f3a).
playground link
gist link
The text was updated successfully, but these errors were encountered: