#[derive] generates unnecessary bound when field is associated type #50729
Labels
A-macros
Area: All kinds of macros (custom derive, macro_rules!, proc macros, ..)
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
With this struct:
The only bound needed on the generated impl is
where T::Err: Debug
. However, the generated code containswhere T: Debug, T::Err: Debug
. Why is the first one necessary? The deriving code already scans the field types to findT::Err
so it should be able to see that bareT
is not mentioned.cc #26925
The text was updated successfully, but these errors were encountered: