#[derive] fails to detect associated type when qualified path is used #50730
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.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
T-types
Relevant to the types team, which will review and decide on the PR/issue.
Uh oh!
There was an error while loading. Please reload this page.
The deriving code scans the field types in order to generate bounds on associated types, if they happen to be used as a field type (this isn't foolproof but it catches a lot of cases).
rust/src/libsyntax_ext/deriving/generic/mod.rs
Lines 350 to 352 in 9fae153
The comment in this code implies that
field: T::Assoc
andfield: <T as Trait>::Assoc
would both work. However, the second one is missed and the required bound is not generated, resulting in a type error:cc #26925.
The text was updated successfully, but these errors were encountered: