11error[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
33 |
44LL | empty("");
55 | ^^^^^ --
@@ -13,8 +13,27 @@ note: function defined here
1313LL | fn empty() {}
1414 | ^^^^^
1515
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+
1635error[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
1837 |
1938LL | one_arg(1, 1);
2039 | ^^^^^^^ ---
@@ -29,7 +48,7 @@ LL | fn one_arg(_a: i32) {}
2948 | ^^^^^^^ -------
3049
3150error[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
3352 |
3453LL | one_arg(1, "");
3554 | ^^^^^^^ ----
@@ -44,7 +63,7 @@ LL | fn one_arg(_a: i32) {}
4463 | ^^^^^^^ -------
4564
4665error[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
4867 |
4968LL | one_arg(1, "", 1.0);
5069 | ^^^^^^^ -- --- unexpected argument of type `{float}`
@@ -63,7 +82,7 @@ LL + one_arg(1);
6382 |
6483
6584error[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
6786 |
6887LL | two_arg_same(1, 1, 1);
6988 | ^^^^^^^^^^^^ ---
@@ -78,7 +97,7 @@ LL | fn two_arg_same(_a: i32, _b: i32) {}
7897 | ^^^^^^^^^^^^ ------- -------
7998
8099error[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
82101 |
83102LL | two_arg_same(1, 1, 1.0);
84103 | ^^^^^^^^^^^^ -----
@@ -93,7 +112,7 @@ LL | fn two_arg_same(_a: i32, _b: i32) {}
93112 | ^^^^^^^^^^^^ ------- -------
94113
95114error[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
97116 |
98117LL | two_arg_diff(1, 1, "");
99118 | ^^^^^^^^^^^^ ---
@@ -108,7 +127,7 @@ LL | fn two_arg_diff(_a: i32, _b: &str) {}
108127 | ^^^^^^^^^^^^ ------- --------
109128
110129error[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
112131 |
113132LL | two_arg_diff(1, "", "");
114133 | ^^^^^^^^^^^^ ----
@@ -123,7 +142,7 @@ LL | fn two_arg_diff(_a: i32, _b: &str) {}
123142 | ^^^^^^^^^^^^ ------- --------
124143
125144error[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
127146 |
128147LL | two_arg_diff(1, 1, "", "");
129148 | ^^^^^^^^^^^^ - -- unexpected argument of type `&'static str`
@@ -142,7 +161,7 @@ LL + two_arg_diff(1, "");
142161 |
143162
144163error[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
146165 |
147166LL | two_arg_diff(1, "", 1, "");
148167 | ^^^^^^^^^^^^ - -- unexpected argument of type `&'static str`
@@ -161,7 +180,7 @@ LL + two_arg_diff(1, "");
161180 |
162181
163182error[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
165184 |
166185LL | two_arg_same(1, 1, "");
167186 | ^^^^^^^^^^^^ --------
@@ -176,7 +195,7 @@ LL | fn two_arg_same(_a: i32, _b: i32) {}
176195 | ^^^^^^^^^^^^ ------- -------
177196
178197error[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
180199 |
181200LL | two_arg_diff(1, 1, "");
182201 | ^^^^^^^^^^^^ ---
@@ -191,7 +210,7 @@ LL | fn two_arg_diff(_a: i32, _b: &str) {}
191210 | ^^^^^^^^^^^^ ------- --------
192211
193212error[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
195214 |
196215LL | two_arg_same(
197216 | ^^^^^^^^^^^^
@@ -211,7 +230,7 @@ LL | fn two_arg_same(_a: i32, _b: i32) {}
211230 | ^^^^^^^^^^^^ ------- -------
212231
213232error[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
215234 |
216235LL | two_arg_diff(
217236 | ^^^^^^^^^^^^
@@ -229,6 +248,26 @@ note: function defined here
229248LL | fn two_arg_diff(_a: i32, _b: &str) {}
230249 | ^^^^^^^^^^^^ ------- --------
231250
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
233272
234273For more information about this error, try `rustc --explain E0061`.
0 commit comments