@@ -44,8 +44,8 @@ LL | one_arg(1, 1);
44
44
note: function defined here
45
45
--> $DIR/extra_arguments.rs:2:4
46
46
|
47
- LL | fn one_arg(_a: i32 ) {}
48
- | ^^^^^^^ -- -----
47
+ LL | fn one_arg<T> (_a: T ) {}
48
+ | ^^^^^^^ -----
49
49
50
50
error[E0061]: this function takes 1 argument but 2 arguments were supplied
51
51
--> $DIR/extra_arguments.rs:23:3
@@ -59,8 +59,8 @@ LL | one_arg(1, "");
59
59
note: function defined here
60
60
--> $DIR/extra_arguments.rs:2:4
61
61
|
62
- LL | fn one_arg(_a: i32 ) {}
63
- | ^^^^^^^ -- -----
62
+ LL | fn one_arg<T> (_a: T ) {}
63
+ | ^^^^^^^ -----
64
64
65
65
error[E0061]: this function takes 1 argument but 3 arguments were supplied
66
66
--> $DIR/extra_arguments.rs:24:3
@@ -73,8 +73,8 @@ LL | one_arg(1, "", 1.0);
73
73
note: function defined here
74
74
--> $DIR/extra_arguments.rs:2:4
75
75
|
76
- LL | fn one_arg(_a: i32 ) {}
77
- | ^^^^^^^ -- -----
76
+ LL | fn one_arg<T> (_a: T ) {}
77
+ | ^^^^^^^ -----
78
78
help: remove the extra arguments
79
79
|
80
80
LL - one_arg(1, "", 1.0);
@@ -318,8 +318,8 @@ LL | one_arg(1, panic!());
318
318
note: function defined here
319
319
--> $DIR/extra_arguments.rs:2:4
320
320
|
321
- LL | fn one_arg(_a: i32 ) {}
322
- | ^^^^^^^ -- -----
321
+ LL | fn one_arg<T> (_a: T ) {}
322
+ | ^^^^^^^ -----
323
323
324
324
error[E0061]: this function takes 1 argument but 2 arguments were supplied
325
325
--> $DIR/extra_arguments.rs:54:3
@@ -333,9 +333,39 @@ LL | one_arg(panic!(), 1);
333
333
note: function defined here
334
334
--> $DIR/extra_arguments.rs:2:4
335
335
|
336
- LL | fn one_arg(_a: i32 ) {}
337
- | ^^^^^^^ -- -----
336
+ LL | fn one_arg<T> (_a: T ) {}
337
+ | ^^^^^^^ -----
338
338
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
340
370
341
371
For more information about this error, try `rustc --explain E0061`.
0 commit comments