summaryrefslogtreecommitdiffstats
path: root/src/test/ui/type/type-params-in-different-spaces-2.rs
blob: 1211e465b0a549b6a12f8111cca3109e6e1a6756 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// Test static calls to make sure that we align the Self and input
// type parameters on a trait correctly.

trait Tr<T> : Sized {
    fn op(_: T) -> Self;
}

trait A:    Tr<Self> {
    fn test<U>(u: U) -> Self {
        Tr::op(u)   //~ ERROR E0277
    }
}

trait B<T>: Tr<T> {
    fn test<U>(u: U) -> Self {
        Tr::op(u)   //~ ERROR E0277
    }
}

fn main() {
}