I have reduced my actual code to this minimal example:
trait Producer where P: Something { fn produce(&self) -> Box; } struct P1
where P: Something { fn produce(&self) -> Box
; } struct P1