Built-in derives don't work when specifying associated types with a fully qualified path. #133232
Labels
A-associated-items
Area: Associated items (types, constants & functions)
A-macros
Area: All kinds of macros (custom derive, macro_rules!, proc macros, ..)
C-bug
Category: This is a bug.
Note: This issue was initially discovered by @lcnr, and mentioned at rust-lang/reference#540 (comment). However, I think that this is a bug in the derive macro, and not in the documentation. Therefore, I am filing this issue.
I tried this code:
I expected the code to compile. Instead, the
Foo
struct compiles fine, but theBar
andBaz
structs don't compile, producing the following error:The same issue also happens when deriving
Debug
,Default
,PartialEq
, orHash
.Meta
Reproduces on the playground on stable rust version 1.82.0, and on nightly rust version
1.84.0-nightly (2024-11-19 ee612c45f00391aff71e)
The text was updated successfully, but these errors were encountered: