An associated item was specified more than once in a trait object.

Erroneous code example:

trait FooTrait {}
trait BarTrait {}

// error: associated type `Item` in trait `Iterator` is specified twice
type Foo = dyn Iterator<Item = u32, Item = u32>;

To fix this, remove the duplicate specifier:

Corrected example:

type Foo = dyn Iterator<Item = u32>; // ok!

For more information about associated types, see the book. For more information on associated type bounds, see RFC 2289.