]> git.lizzy.rs Git - rust.git/blob - tests/target/issue-811.rs
Handle attributes on modules (#968)
[rust.git] / tests / target / issue-811.rs
1 trait FooTrait<T>: Sized {
2     type Bar: BarTrait<T>;
3 }
4
5 trait BarTrait<T>: Sized {
6     type Baz;
7     fn foo();
8 }
9
10 type Foo<T: FooTrait> =
11     <<T as FooTrait<U>>::Bar as BarTrait<U>>::Baz;
12 type Bar<T: BarTrait> = <T as BarTrait<U>>::Baz;
13
14 fn some_func<T: FooTrait<U>, U>() {
15     <<T as FooTrait<U>>::Bar as BarTrait<U>>::foo();
16 }
17
18 fn some_func<T: BarTrait<U>>() {
19     <T as BarTrait<U>>::foo();
20 }