Derived Clone
impl is not simplified if Clone
is derived before Copy
#124794
Labels
A-macros
Area: All kinds of macros (custom derive, macro_rules!, proc macros, ..)
C-bug
Category: This is a bug.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Of these 4 ways to derive Copy and Clone:
The last one (derive Clone, then derive Copy) does not use the simplified form of the Clone derive for Copy types:
I don't think this leads to any problems currently, but it's an odd (kind of amusing) inconsistency and may (citation needed) make for slightly worse codegen.
The text was updated successfully, but these errors were encountered: