Type parameter versus type alias in trait

Hmm, you gave an interesting syntax, that I also had in mind but thought wouldn't work:

In a way it could work (even if it doesn't), because U is (indirectly) restricted due to being mentioned in the where clause.

I remember you mentioned the requirement to constrain type parameters somehow (as demanded by RFC 447), and I just searched the history and found your message here in "Weird error with tokio::try_join! and mapped futures".

As far as I understand, RFC 447 came after associated types were introduced. So maybe allowing the syntax impl<T, U> … could have been a (worse) alternative to the associated types? Maybe it's more difficult to implement a compiler allowing these things (and stuff like nested impls).