about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorNiko Matsakis <niko@alum.mit.edu>2014-10-17 08:04:34 -0400
committerNiko Matsakis <niko@alum.mit.edu>2014-10-17 08:04:34 -0400
commitf4a7d32c8b53649d20735c8a90469b08fe7cc3dc (patch)
tree041746a6433a2e6c2674c44995c2c2d12158cb7e /src
parent590a61f788e058d7ae95806f55258bce3ae45567 (diff)
downloadrust-f4a7d32c8b53649d20735c8a90469b08fe7cc3dc.tar.gz
rust-f4a7d32c8b53649d20735c8a90469b08fe7cc3dc.zip
Correct a test. The error message changed because, with this fix, we
detected (correctly) that there was only one impl and hence ignored the
`Self` bound completely. I (semi-arbitrarily) elected to delect the
impl, forcing the trait matcher to be more conservative and lean on the
where clauses in scope, yielding the original error message.
Diffstat (limited to 'src')
-rw-r--r--src/test/compile-fail/type-params-in-different-spaces-2.rs11
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)));
 }