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