Closed
Description
I tried this code:
pub trait Trait1 {
fn f();
}
pub trait Trait2 {
type Type: Trait1;
}
pub trait Trait3 {
type Type2: Trait2<Type = Self>;
fn f2() {
<Self as Trait1>::f();
}
}
I expected to see this compile successfully since in Trait3
, Self
is guaranteed to implement Trait1
because Self = Trait2::Type
and Trait2::Type: Trait1
.
Instead, this happened:
error[E0277]: the trait bound `Self: Trait1` is not satisfied