trait Foo: Iterator {} //~^ ERROR is already specified //~| ERROR is already specified //~| ERROR is already specified type Unit = (); fn test() -> Box> { //~^ ERROR is already specified Box::new(None.into_iter()) } fn main() { let _: &dyn Iterator; //~^ ERROR already specified test(); }