Wrong Clone
bound suggestion
#110446
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
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.
Code
Playground: https://play.rust-lang.org/?version=nightly&mode=debug&edition=2021&gist=cda41942df9b5feddbbf2417959e717a
Current output
Desired output
Rationale and extra context
The root cause is that
P
infoo<P>
has not been restricted by theClone
bound, but the compiler suggests users to add#[derive(Clone)]
onstruct B<A>
, which has already been done.Other cases
No response
Anything else?
rustc
versions:I have tested the same code under both of the versions and the outputs are the same.
The text was updated successfully, but these errors were encountered: