about summary refs log tree commit diff
path: root/src/test/ui/methods/method-self-arg-1.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/methods/method-self-arg-1.rs')
-rw-r--r--src/test/ui/methods/method-self-arg-1.rs17
1 files changed, 0 insertions, 17 deletions
diff --git a/src/test/ui/methods/method-self-arg-1.rs b/src/test/ui/methods/method-self-arg-1.rs
deleted file mode 100644
index f589f20d81d..00000000000
--- a/src/test/ui/methods/method-self-arg-1.rs
+++ /dev/null
@@ -1,17 +0,0 @@
-// Test method calls with self as an argument cannot subvert type checking.
-
-struct Foo;
-
-impl Foo {
-    fn bar(&self) {}
-}
-
-fn main() {
-    let x = Foo;
-    Foo::bar(x); //~  ERROR mismatched types
-                 //~| expected `&Foo`, found struct `Foo`
-    Foo::bar(&42); //~  ERROR mismatched types
-                      //~| expected struct `Foo`, found integer
-                      //~| expected reference `&Foo`
-                      //~| found reference `&{integer}`
-}