Is it possible to add a bound to the associated item of an impl Trait
in return position?
Some kind of hypothetical syntax:
trait Trait;
// inline
fn make_foo() -> impl Iterator<Item: impl Trait> { /* ... */ }
// where clause
fn make_bar() -> impl Iterator
where
<return as Iterator>::Item: Trait
{ /* ... */ }
This would allow to return an anonymous type implementing a trait, and where the associated type of said trait itself is anonymous.