diff options
| -rw-r--r-- | src/test/compile-fail/type-params-in-different-spaces-2.rs | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/test/compile-fail/type-params-in-different-spaces-2.rs b/src/test/compile-fail/type-params-in-different-spaces-2.rs index d1bbda932cb..9be64bf5346 100644 --- a/src/test/compile-fail/type-params-in-different-spaces-2.rs +++ b/src/test/compile-fail/type-params-in-different-spaces-2.rs @@ -8,28 +8,25 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// Test static calls to make sure that we align the Self and input +// type parameters on a trait correctly. + trait Tr<T> { fn op(T) -> Self; } -// these compile as if Self: Tr<U>, even tho only Self: Tr<Self or T> trait A: Tr<Self> { fn test<U>(u: U) -> Self { Tr::op(u) //~ ERROR not implemented } } + trait B<T>: Tr<T> { fn test<U>(u: U) -> Self { Tr::op(u) //~ ERROR not implemented } } -impl<T> Tr<T> for T { - fn op(t: T) -> T { t } -} -impl<T> A for T {} - fn main() { - std::io::println(A::test((&7306634593706211700, 8))); } |
