]> git.lizzy.rs Git - rust.git/blobdiff - src/test/compile-fail/explicit-self-lifetime-mismatch.rs
address review comments
[rust.git] / src / test / compile-fail / explicit-self-lifetime-mismatch.rs
index b5432fafb1b855f0b09cb6a1a2634b847673acc8..f8aa1ea95f0f66d51039d8bb09d1c11502bf1ec2 100644 (file)
@@ -14,15 +14,17 @@ struct Foo<'a,'b> {
 }
 
 impl<'a,'b> Foo<'a,'b> {
-    fn bar(self: Foo<'b,'a>) {}
-    //~^ ERROR mismatched types
+    fn bar(
+        self
+    //~^ ERROR mismatched method receiver
     //~| expected type `Foo<'a, 'b>`
     //~| found type `Foo<'b, 'a>`
     //~| lifetime mismatch
-    //~| ERROR mismatched types
+    //~| ERROR mismatched method receiver
     //~| expected type `Foo<'a, 'b>`
     //~| found type `Foo<'b, 'a>`
     //~| lifetime mismatch
+            : Foo<'b,'a>) {}
 }
 
 fn main() {}