]> git.lizzy.rs Git - rust.git/blobdiff - src/test/compile-fail/issue-2356.rs
Make name resolution errors non-fatal
[rust.git] / src / test / compile-fail / issue-2356.rs
index 48cc27e228940b74f93d71640562f64224e88f59..6b81afe13c671d5fca639f058b7c8fdc4ada1e03 100644 (file)
@@ -9,7 +9,7 @@
 // except according to those terms.
 
 trait Groom {
-    fn shave();
+    fn shave(other: usize);
 }
 
 pub struct cat {
@@ -30,7 +30,7 @@ fn bark() {
 }
 
 impl Groom for cat {
-  fn shave(&self, other: usize) {
+  fn shave(other: usize) {
     whiskers -= other;
     //~^ ERROR: unresolved name `whiskers`. Did you mean `self.whiskers`?
     shave(4);