@@ -44,8 +44,8 @@ LL | one_arg(1, 1);
4444note: function defined here
4545 --> $DIR/extra_arguments.rs:2:4
4646 |
47- LL | fn one_arg(_a: i32 ) {}
48- | ^^^^^^^ -- -----
47+ LL | fn one_arg<T> (_a: T ) {}
48+ | ^^^^^^^ -----
4949
5050error[E0061]: this function takes 1 argument but 2 arguments were supplied
5151 --> $DIR/extra_arguments.rs:23:3
@@ -59,8 +59,8 @@ LL | one_arg(1, "");
5959note: function defined here
6060 --> $DIR/extra_arguments.rs:2:4
6161 |
62- LL | fn one_arg(_a: i32 ) {}
63- | ^^^^^^^ -- -----
62+ LL | fn one_arg<T> (_a: T ) {}
63+ | ^^^^^^^ -----
6464
6565error[E0061]: this function takes 1 argument but 3 arguments were supplied
6666 --> $DIR/extra_arguments.rs:24:3
@@ -73,8 +73,8 @@ LL | one_arg(1, "", 1.0);
7373note: function defined here
7474 --> $DIR/extra_arguments.rs:2:4
7575 |
76- LL | fn one_arg(_a: i32 ) {}
77- | ^^^^^^^ -- -----
76+ LL | fn one_arg<T> (_a: T ) {}
77+ | ^^^^^^^ -----
7878help: remove the extra arguments
7979 |
8080LL - one_arg(1, "", 1.0);
@@ -318,8 +318,8 @@ LL | one_arg(1, panic!());
318318note: function defined here
319319 --> $DIR/extra_arguments.rs:2:4
320320 |
321- LL | fn one_arg(_a: i32 ) {}
322- | ^^^^^^^ -- -----
321+ LL | fn one_arg<T> (_a: T ) {}
322+ | ^^^^^^^ -----
323323
324324error[E0061]: this function takes 1 argument but 2 arguments were supplied
325325 --> $DIR/extra_arguments.rs:54:3
@@ -333,9 +333,39 @@ LL | one_arg(panic!(), 1);
333333note: function defined here
334334 --> $DIR/extra_arguments.rs:2:4
335335 |
336- LL | fn one_arg(_a: i32 ) {}
337- | ^^^^^^^ -- -----
336+ LL | fn one_arg<T> (_a: T ) {}
337+ | ^^^^^^^ -----
338338
339- error: aborting due to 20 previous errors
339+ error[E0061]: this function takes 1 argument but 2 arguments were supplied
340+ --> $DIR/extra_arguments.rs:55:3
341+ |
342+ LL | one_arg(stringify!($e), 1);
343+ | ^^^^^^^ ---
344+ | | |
345+ | | unexpected argument of type `{integer}`
346+ | help: remove the extra argument
347+ |
348+ note: function defined here
349+ --> $DIR/extra_arguments.rs:2:4
350+ |
351+ LL | fn one_arg<T>(_a: T) {}
352+ | ^^^^^^^ -----
353+
354+ error[E0061]: this function takes 1 argument but 2 arguments were supplied
355+ --> $DIR/extra_arguments.rs:60:3
356+ |
357+ LL | one_arg(for _ in 1.. {}, 1);
358+ | ^^^^^^^ ---
359+ | | |
360+ | | unexpected argument of type `{integer}`
361+ | help: remove the extra argument
362+ |
363+ note: function defined here
364+ --> $DIR/extra_arguments.rs:2:4
365+ |
366+ LL | fn one_arg<T>(_a: T) {}
367+ | ^^^^^^^ -----
368+
369+ error: aborting due to 22 previous errors
340370
341371For more information about this error, try `rustc --explain E0061`.
0 commit comments