derive
generates incorrect bounds for associated types
#122531
Labels
A-macros
Area: All kinds of macros (custom derive, macro_rules!, proc macros, ..)
C-bug
Category: This is a bug.
S-has-mcve
Status: A Minimal Complete and Verifiable Example has been found for this issue
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
I think there's a bug causing incorrect
derive
behaviour for a field whose type is an associated type extracted from a generic parameter.The macro expansion makes the problem clearer.
It seems to confuse the associated type with the generic that carries it, causing it to add the bound
AWC: ::core::default::Default
unexpectedly.It also adds
AWC::Defaultable: ::core::default::Default
, which is consistent but superfluous.Link to playground
The text was updated successfully, but these errors were encountered: