Deriving can't be used within macros because it generates duplicate impls #6976
Labels
A-syntaxext
Area: Syntax extensions
E-needs-test
Call for participation: An issue has been fixed and does not reproduce, but no test has been added.
This:
...doesn't compile:
Taking a look at the expanded code:
Notice that it's generating a second identical impl for the given trait. I've tested that this happens with both
Eq
andToStr
, so I presume it applies to the deriving code in general.The text was updated successfully, but these errors were encountered: