Suggestion to derive traits does not consider needing to implement supertraits #91550
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: https://play.rust-lang.org/?version=nightly&mode=debug&edition=2021&gist=8d2ebff94e06c67049c0ad3f096873ff
The current output is:
Ideally the output should look like:
This way, the suggested code will compile without the user needing to know that in order to derive Eq, you must implement PartialEq.
There's also an issue where you need the
::<Value>
turbofish in the above code for the suggestion to show up, I'll make a separate issue for that.The text was updated successfully, but these errors were encountered: