Rust Argument-Position Impl Trait (also called anonymous type parameter) is a syntactic sugar that simplify generic function code when we don’t need to use the same generic type parameter twice.

For example, the following codes are equivalent:

// generic type parameter
fn foo<T: Trait>(arg: T) {}
 
// impl Trait in argument position
fn foo(arg: impl Trait) {}

This feature is analogous to C++‘s constrained auto parameters.

References