]> git.lizzy.rs Git - rust.git/blob - 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
1 error[E0061]: this function takes 0 arguments but 1 argument was supplied
2   --> $DIR/method-call-err-msg.rs:13:7
3    |
4 LL |     fn zero(self) -> Foo { self }
5    |     -------------------- defined here
6 ...
7 LL |     x.zero(0)
8    |       ^^^^ - supplied 1 argument
9    |       |
10    |       expected 0 arguments
11
12 error[E0061]: this function takes 1 argument but 0 arguments were supplied
13   --> $DIR/method-call-err-msg.rs:14:7
14    |
15 LL |     fn one(self, _: isize) -> Foo { self }
16    |     ----------------------------- defined here
17 ...
18 LL |      .one()
19    |       ^^^- supplied 0 arguments
20    |       |
21    |       expected 1 argument
22
23 error[E0061]: this function takes 2 arguments but 1 argument was supplied
24   --> $DIR/method-call-err-msg.rs:15:7
25    |
26 LL |     fn two(self, _: isize, _: isize) -> Foo { self }
27    |     --------------------------------------- defined here
28 ...
29 LL |      .two(0);
30    |       ^^^ - supplied 1 argument
31    |       |
32    |       expected 2 arguments
33
34 error[E0599]: no method named `take` found for struct `Foo` in the current scope
35   --> $DIR/method-call-err-msg.rs:19:7
36    |
37 LL | pub struct Foo;
38    | ---------------
39    | |
40    | method `take` not found for this
41    | doesn't satisfy `Foo: std::iter::Iterator`
42 ...
43 LL |      .take()
44    |       ^^^^ method not found in `Foo`
45    |
46    = note: the method `take` exists but the following trait bounds were not satisfied:
47            `Foo: std::iter::Iterator`
48            which is required by `&mut Foo: std::iter::Iterator`
49    = help: items from traits can only be used if the trait is implemented and in scope
50    = note: the following trait defines an item `take`, perhaps you need to implement it:
51            candidate #1: `std::iter::Iterator`
52
53 error[E0061]: this function takes 3 arguments but 0 arguments were supplied
54   --> $DIR/method-call-err-msg.rs:21:7
55    |
56 LL |     fn three<T>(self, _: T, _: T, _: T) -> Foo { self }
57    |     ------------------------------------------ defined here
58 ...
59 LL |     y.three::<usize>();
60    |       ^^^^^--------- supplied 0 arguments
61    |       |
62    |       expected 3 arguments
63
64 error: aborting due to 5 previous errors
65
66 Some errors have detailed explanations: E0061, E0599.
67 For more information about an error, try `rustc --explain E0061`.