blob: b7a89b5d0f9dc3a10abced001a68abd4d9e864c8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
trait FooTrait<T>: Sized {
type Bar: BarTrait<T>;
}
trait BarTrait<T>: Sized {
type Baz;
fn foo();
}
type Foo<T: FooTrait> = <<T as FooTrait<U>>::Bar as BarTrait<U>>::Baz;
type Bar<T: BarTrait> = <T as BarTrait<U>>::Baz;
fn some_func<T: FooTrait<U>, U>() {
<<T as FooTrait<U>>::Bar as BarTrait<U>>::foo();
}
fn some_func<T: BarTrait<U>>() {
<T as BarTrait<U>>::foo();
}
|