What
specs/ml/optimizer/adamw.t27 does not declare AdamWConfig:
$ grep -c 'struct AdamWConfig' specs/ml/optimizer/adamw.t27
0
but the generated Rust declares it twice:
$ t27c gen-rust specs/ml/optimizer/adamw.t27 | grep -c 'pub struct AdamWConfig'
2
so the module cannot compile:
error[E0119]: conflicting implementations of trait `Debug` for type `AdamWConfig`
--> :119:10
|
25 | #[derive(Debug, Clone, Copy)]
| ----- first implementation here
...
119 | #[derive(Debug, Clone, Copy)]
The type arrives through the spec's use list:
use base::types;
use math::constants;
use numeric::gf16;
Three structs are affected in this file -- AdamWConfig, AdamWState,
OptimizerStepResult -- one E0119 per derived trait per duplicate.
Why it is worth a separate issue
The error count moves with unrelated work. Adding a third derived trait to
these structs raised E0119 from 6 to 7 while fixing #3436, which looked like
a regression in that change and is not one -- the file fails to compile either
way. A duplicate emission that inflates counts on someone else's diff is worth
removing on its own.
Where to look
bootstrap/src/use_resolve.rs. by_origin groups candidates and the emitter
takes distinct[0]; #3411 made that choice deterministic but did not ask
whether a name can reach the output through two paths at once.
Not yet measured
How many specs carry a duplicate declaration. E0119 appears in 1 file today,
but that only counts duplicates whose derives conflict -- a duplicated fn
would surface as E0428 instead, and that has not been separated.
What
specs/ml/optimizer/adamw.t27does not declareAdamWConfig:but the generated Rust declares it twice:
so the module cannot compile:
The type arrives through the spec's
uselist:Three structs are affected in this file --
AdamWConfig,AdamWState,OptimizerStepResult-- oneE0119per derived trait per duplicate.Why it is worth a separate issue
The error count moves with unrelated work. Adding a third derived trait to
these structs raised
E0119from 6 to 7 while fixing #3436, which looked likea regression in that change and is not one -- the file fails to compile either
way. A duplicate emission that inflates counts on someone else's diff is worth
removing on its own.
Where to look
bootstrap/src/use_resolve.rs.by_origingroups candidates and the emittertakes
distinct[0]; #3411 made that choice deterministic but did not askwhether a name can reach the output through two paths at once.
Not yet measured
How many specs carry a duplicate declaration.
E0119appears in 1 file today,but that only counts duplicates whose derives conflict -- a duplicated
fnwould surface as
E0428instead, and that has not been separated.