You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be nice if where T: Trait<AssocType: Bound> were equivalent to where T: Trait, <T as Trait>::AssocType: Bound, by analogy with T: Trait<AssocType = Type>.
The text was updated successfully, but these errors were encountered:
nrc
added
the
T-lang
Relevant to the language team, which will review and decide on the RFC.
label
Aug 30, 2016
This, by introducing an implicit type variable, has consequences for bounds on associated-type parameters of associated types, where currently one needs to bubble the type information up to the outer trait and then use a projection bound to push it back down again:
trait Foo {
type It: Iterator<Item: Iterator<Item=u8>>;
}
currently needs to be written as
trait Foo {
type It2: Iterator<Item=u8>;
type It: Iterator<Item=It2>;
}
It would be nice if
where T: Trait<AssocType: Bound>
were equivalent towhere T: Trait, <T as Trait>::AssocType: Bound
, by analogy withT: Trait<AssocType = Type>
.The text was updated successfully, but these errors were encountered: