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