1
1
error[E0061]: this function takes 0 arguments but 1 argument was supplied
2
- --> $DIR/extra_arguments.rs:7 :3
2
+ --> $DIR/extra_arguments.rs:13 :3
3
3
|
4
4
LL | empty("");
5
5
| ^^^^^ --
@@ -13,8 +13,27 @@ note: function defined here
13
13
LL | fn empty() {}
14
14
| ^^^^^
15
15
16
+ error[E0061]: this function takes 0 arguments but 2 arguments were supplied
17
+ --> $DIR/extra_arguments.rs:14:3
18
+ |
19
+ LL | empty(1, 1);
20
+ | ^^^^^ - - unexpected argument of type `{integer}`
21
+ | |
22
+ | unexpected argument of type `{integer}`
23
+ |
24
+ note: function defined here
25
+ --> $DIR/extra_arguments.rs:1:4
26
+ |
27
+ LL | fn empty() {}
28
+ | ^^^^^
29
+ help: remove the extra arguments
30
+ |
31
+ LL - empty(1, 1);
32
+ LL + empty();
33
+ |
34
+
16
35
error[E0061]: this function takes 1 argument but 2 arguments were supplied
17
- --> $DIR/extra_arguments.rs:9 :3
36
+ --> $DIR/extra_arguments.rs:16 :3
18
37
|
19
38
LL | one_arg(1, 1);
20
39
| ^^^^^^^ ---
@@ -29,7 +48,7 @@ LL | fn one_arg(_a: i32) {}
29
48
| ^^^^^^^ -------
30
49
31
50
error[E0061]: this function takes 1 argument but 2 arguments were supplied
32
- --> $DIR/extra_arguments.rs:10 :3
51
+ --> $DIR/extra_arguments.rs:17 :3
33
52
|
34
53
LL | one_arg(1, "");
35
54
| ^^^^^^^ ----
@@ -44,7 +63,7 @@ LL | fn one_arg(_a: i32) {}
44
63
| ^^^^^^^ -------
45
64
46
65
error[E0061]: this function takes 1 argument but 3 arguments were supplied
47
- --> $DIR/extra_arguments.rs:11 :3
66
+ --> $DIR/extra_arguments.rs:18 :3
48
67
|
49
68
LL | one_arg(1, "", 1.0);
50
69
| ^^^^^^^ -- --- unexpected argument of type `{float}`
@@ -63,7 +82,7 @@ LL + one_arg(1);
63
82
|
64
83
65
84
error[E0061]: this function takes 2 arguments but 3 arguments were supplied
66
- --> $DIR/extra_arguments.rs:13 :3
85
+ --> $DIR/extra_arguments.rs:20 :3
67
86
|
68
87
LL | two_arg_same(1, 1, 1);
69
88
| ^^^^^^^^^^^^ ---
@@ -78,7 +97,7 @@ LL | fn two_arg_same(_a: i32, _b: i32) {}
78
97
| ^^^^^^^^^^^^ ------- -------
79
98
80
99
error[E0061]: this function takes 2 arguments but 3 arguments were supplied
81
- --> $DIR/extra_arguments.rs:14 :3
100
+ --> $DIR/extra_arguments.rs:21 :3
82
101
|
83
102
LL | two_arg_same(1, 1, 1.0);
84
103
| ^^^^^^^^^^^^ -----
@@ -93,7 +112,7 @@ LL | fn two_arg_same(_a: i32, _b: i32) {}
93
112
| ^^^^^^^^^^^^ ------- -------
94
113
95
114
error[E0061]: this function takes 2 arguments but 3 arguments were supplied
96
- --> $DIR/extra_arguments.rs:16 :3
115
+ --> $DIR/extra_arguments.rs:23 :3
97
116
|
98
117
LL | two_arg_diff(1, 1, "");
99
118
| ^^^^^^^^^^^^ ---
@@ -108,7 +127,7 @@ LL | fn two_arg_diff(_a: i32, _b: &str) {}
108
127
| ^^^^^^^^^^^^ ------- --------
109
128
110
129
error[E0061]: this function takes 2 arguments but 3 arguments were supplied
111
- --> $DIR/extra_arguments.rs:17 :3
130
+ --> $DIR/extra_arguments.rs:24 :3
112
131
|
113
132
LL | two_arg_diff(1, "", "");
114
133
| ^^^^^^^^^^^^ ----
@@ -123,7 +142,7 @@ LL | fn two_arg_diff(_a: i32, _b: &str) {}
123
142
| ^^^^^^^^^^^^ ------- --------
124
143
125
144
error[E0061]: this function takes 2 arguments but 4 arguments were supplied
126
- --> $DIR/extra_arguments.rs:18 :3
145
+ --> $DIR/extra_arguments.rs:25 :3
127
146
|
128
147
LL | two_arg_diff(1, 1, "", "");
129
148
| ^^^^^^^^^^^^ - -- unexpected argument of type `&'static str`
@@ -142,7 +161,7 @@ LL + two_arg_diff(1, "");
142
161
|
143
162
144
163
error[E0061]: this function takes 2 arguments but 4 arguments were supplied
145
- --> $DIR/extra_arguments.rs:19 :3
164
+ --> $DIR/extra_arguments.rs:26 :3
146
165
|
147
166
LL | two_arg_diff(1, "", 1, "");
148
167
| ^^^^^^^^^^^^ - -- unexpected argument of type `&'static str`
@@ -161,7 +180,7 @@ LL + two_arg_diff(1, "");
161
180
|
162
181
163
182
error[E0061]: this function takes 2 arguments but 3 arguments were supplied
164
- --> $DIR/extra_arguments.rs:22 :3
183
+ --> $DIR/extra_arguments.rs:29 :3
165
184
|
166
185
LL | two_arg_same(1, 1, "");
167
186
| ^^^^^^^^^^^^ --------
@@ -176,7 +195,7 @@ LL | fn two_arg_same(_a: i32, _b: i32) {}
176
195
| ^^^^^^^^^^^^ ------- -------
177
196
178
197
error[E0061]: this function takes 2 arguments but 3 arguments were supplied
179
- --> $DIR/extra_arguments.rs:23 :3
198
+ --> $DIR/extra_arguments.rs:30 :3
180
199
|
181
200
LL | two_arg_diff(1, 1, "");
182
201
| ^^^^^^^^^^^^ ---
@@ -191,7 +210,7 @@ LL | fn two_arg_diff(_a: i32, _b: &str) {}
191
210
| ^^^^^^^^^^^^ ------- --------
192
211
193
212
error[E0061]: this function takes 2 arguments but 3 arguments were supplied
194
- --> $DIR/extra_arguments.rs:24 :3
213
+ --> $DIR/extra_arguments.rs:31 :3
195
214
|
196
215
LL | two_arg_same(
197
216
| ^^^^^^^^^^^^
@@ -211,7 +230,7 @@ LL | fn two_arg_same(_a: i32, _b: i32) {}
211
230
| ^^^^^^^^^^^^ ------- -------
212
231
213
232
error[E0061]: this function takes 2 arguments but 3 arguments were supplied
214
- --> $DIR/extra_arguments.rs:30 :3
233
+ --> $DIR/extra_arguments.rs:37 :3
215
234
|
216
235
LL | two_arg_diff(
217
236
| ^^^^^^^^^^^^
@@ -229,6 +248,26 @@ note: function defined here
229
248
LL | fn two_arg_diff(_a: i32, _b: &str) {}
230
249
| ^^^^^^^^^^^^ ------- --------
231
250
232
- error: aborting due to 14 previous errors
251
+ error[E0061]: this function takes 0 arguments but 2 arguments were supplied
252
+ --> $DIR/extra_arguments.rs:8:9
253
+ |
254
+ LL | empty($x, 1);
255
+ | ^^^^^ - unexpected argument of type `{integer}`
256
+ ...
257
+ LL | foo!(1);
258
+ | -------
259
+ | | |
260
+ | | unexpected argument of type `{integer}`
261
+ | | help: remove the extra argument
262
+ | in this macro invocation
263
+ |
264
+ note: function defined here
265
+ --> $DIR/extra_arguments.rs:1:4
266
+ |
267
+ LL | fn empty() {}
268
+ | ^^^^^
269
+ = note: this error originates in the macro `foo` (in Nightly builds, run with -Z macro-backtrace for more info)
270
+
271
+ error: aborting due to 16 previous errors
233
272
234
273
For more information about this error, try `rustc --explain E0061`.
0 commit comments