1
1
error[E0061]: this function takes 0 arguments but 1 argument was supplied
2
2
--> $DIR/method-call-err-msg.rs:13:7
3
3
|
4
- LL | fn zero(self) -> Foo { self }
5
- | -------------------- defined here
6
- ...
7
4
LL | x.zero(0)
8
5
| ^^^^ - supplied 1 argument
9
6
| |
10
7
| expected 0 arguments
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
+ | ^^^^ ----
11
14
12
15
error[E0061]: this function takes 1 argument but 0 arguments were supplied
13
16
--> $DIR/method-call-err-msg.rs:14:7
14
17
|
15
- LL | fn one(self, _: isize) -> Foo { self }
16
- | ----------------------------- defined here
17
- ...
18
18
LL | .one()
19
19
| ^^^- supplied 0 arguments
20
20
| |
21
21
| expected 1 argument
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
+ | ^^^ ---- --------
22
28
23
29
error[E0061]: this function takes 2 arguments but 1 argument was supplied
24
30
--> $DIR/method-call-err-msg.rs:15:7
25
31
|
26
- LL | fn two(self, _: isize, _: isize) -> Foo { self }
27
- | --------------------------------------- defined here
28
- ...
29
32
LL | .two(0);
30
33
| ^^^ - supplied 1 argument
31
34
| |
32
35
| expected 2 arguments
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
+ | ^^^ ---- -------- --------
33
42
34
43
error[E0599]: no method named `take` found for struct `Foo` in the current scope
35
44
--> $DIR/method-call-err-msg.rs:19:7
@@ -53,13 +62,16 @@ LL | .take()
53
62
error[E0061]: this function takes 3 arguments but 0 arguments were supplied
54
63
--> $DIR/method-call-err-msg.rs:21:7
55
64
|
56
- LL | fn three<T>(self, _: T, _: T, _: T) -> Foo { self }
57
- | ------------------------------------------ defined here
58
- ...
59
65
LL | y.three::<usize>();
60
66
| ^^^^^--------- supplied 0 arguments
61
67
| |
62
68
| expected 3 arguments
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
+ | ^^^^^ ---- ---- ---- ----
63
75
64
76
error: aborting due to 5 previous errors
65
77
0 commit comments