Many traits that currently take type parameters should instead use associated types; this will drastically simplify signatures in some cases.
Associated constants would be useful in a few places, e.g. traits for numerics, traits for paths.
impl Trait
types)Could affect API design in several places, e.g. the Iterator
trait.
We are already using this in a few places (e.g. HashMap
), but it's
feature-gated.
https://github.com/mozilla/rust/issues/11621