]> git.lizzy.rs Git - rust.git/blobdiff - src/test/ui/methods/method-call-err-msg.stderr
Do not suggest implementing traits if present in predicates
[rust.git] / src / test / ui / methods / method-call-err-msg.stderr
index 7efdd91708a80618bd0b206e233b4a613db76f7c..4678642dd6d0cb9bfff87afa1879d6af72ae7b3d 100644 (file)
@@ -1,47 +1,67 @@
-error[E0061]: this function takes 0 parameters but 1 parameter was supplied
-  --> $DIR/method-call-err-msg.rs:12:7
+error[E0061]: this function takes 0 arguments but 1 argument was supplied
+  --> $DIR/method-call-err-msg.rs:13:7
    |
 LL |     fn zero(self) -> Foo { self }
    |     -------------------- defined here
 ...
 LL |     x.zero(0)
-   |       ^^^^ expected 0 parameters
+   |       ^^^^ - supplied 1 argument
+   |       |
+   |       expected 0 arguments
 
-error[E0061]: this function takes 1 parameter but 0 parameters were supplied
-  --> $DIR/method-call-err-msg.rs:13:7
+error[E0061]: this function takes 1 argument but 0 arguments were supplied
+  --> $DIR/method-call-err-msg.rs:14:7
    |
 LL |     fn one(self, _: isize) -> Foo { self }
    |     ----------------------------- defined here
 ...
 LL |      .one()
-   |       ^^^ expected 1 parameter
+   |       ^^^- supplied 0 arguments
+   |       |
+   |       expected 1 argument
 
-error[E0061]: this function takes 2 parameters but 1 parameter was supplied
-  --> $DIR/method-call-err-msg.rs:14:7
+error[E0061]: this function takes 2 arguments but 1 argument was supplied
+  --> $DIR/method-call-err-msg.rs:15:7
    |
 LL |     fn two(self, _: isize, _: isize) -> Foo { self }
    |     --------------------------------------- defined here
 ...
 LL |      .two(0);
-   |       ^^^ expected 2 parameters
+   |       ^^^ - supplied 1 argument
+   |       |
+   |       expected 2 arguments
 
 error[E0599]: no method named `take` found for struct `Foo` in the current scope
-  --> $DIR/method-call-err-msg.rs:18:7
+  --> $DIR/method-call-err-msg.rs:19:7
    |
 LL | pub struct Foo;
-   | --------------- method `take` not found for this
+   | ---------------
+   | |
+   | method `take` not found for this
+   | doesn't satisfy `Foo: std::iter::Iterator`
 ...
 LL |      .take()
    |       ^^^^ method not found in `Foo`
    |
    = note: the method `take` exists but the following trait bounds were not satisfied:
-           `&mut Foo : std::iter::Iterator`
+           `Foo: std::iter::Iterator`
+           which is required by `&mut Foo: std::iter::Iterator`
    = help: items from traits can only be used if the trait is implemented and in scope
-   = note: the following traits define an item `take`, perhaps you need to implement one of them:
-           candidate #1: `std::io::Read`
-           candidate #2: `std::iter::Iterator`
+   = note: the following trait defines an item `take`, perhaps you need to implement it:
+           candidate #1: `std::iter::Iterator`
+
+error[E0061]: this function takes 3 arguments but 0 arguments were supplied
+  --> $DIR/method-call-err-msg.rs:21:7
+   |
+LL |     fn three<T>(self, _: T, _: T, _: T) -> Foo { self }
+   |     ------------------------------------------ defined here
+...
+LL |     y.three::<usize>();
+   |       ^^^^^--------- supplied 0 arguments
+   |       |
+   |       expected 3 arguments
 
-error: aborting due to 4 previous errors
+error: aborting due to 5 previous errors
 
 Some errors have detailed explanations: E0061, E0599.
 For more information about an error, try `rustc --explain E0061`.