]> git.lizzy.rs Git - rust.git/blob - tests/ui/type/type-params-in-different-spaces-2.rs
Move /src/test to /tests
[rust.git] / tests / ui / type / type-params-in-different-spaces-2.rs
1 // Test static calls to make sure that we align the Self and input
2 // type parameters on a trait correctly.
3
4 trait Tr<T> : Sized {
5     fn op(_: T) -> Self;
6 }
7
8 trait A:    Tr<Self> {
9     fn test<U>(u: U) -> Self {
10         Tr::op(u)   //~ ERROR E0277
11     }
12 }
13
14 trait B<T>: Tr<T> {
15     fn test<U>(u: U) -> Self {
16         Tr::op(u)   //~ ERROR E0277
17     }
18 }
19
20 fn main() {
21 }