Matthias Krüger
2b34490da6
Rollup merge of #125042 - long-long-float:suggest-move-arg-outside, r=fmease
...
Use ordinal number in argument error
Add an ordinal number to two argument errors ("unexpected" and "missing") for ease of understanding error.
```
error[E0061]: this function takes 3 arguments but 2 arguments were supplied
--> test.rs:11:5
|
11 | f(42, 'a');
| ^ --- 2nd argument of type `f32` is missing
|
(snip)
error[E0061]: this function takes 3 arguments but 4 arguments were supplied
--> test.rs:12:5
|
12 | f(42, 42, 1.0, 'a');
| ^ ----
| | |
| | unexpected 2nd argument of type `{integer}`
| help: remove the extra argument
```
To get an ordinal number, I copied `ordinalize` from other crate `rustc_resolve` because I think it is too much to link `rustc_resolve` for this small function. Please let me know if there is a better way.
2024-07-17 16:22:26 +02:00
..
2024-04-21 15:43:43 -03:00
2024-07-11 20:39:24 +00:00
2024-07-12 21:16:09 -04:00
2024-04-15 08:54:11 -04:00
2024-04-11 16:41:41 +00:00
2024-07-11 20:39:24 +00:00
2024-04-15 08:54:11 -04:00
2024-03-27 14:02:16 +00:00
2024-04-24 22:21:15 +00:00
2024-07-14 13:50:09 +09:00
2024-06-05 23:20:09 +08:00
2024-04-07 01:16:45 +02:00
2024-07-04 06:06:33 +00:00
2024-05-04 11:30:38 +02:00
2024-06-12 12:34:47 +00:00
2024-04-15 08:54:11 -04:00
2024-06-25 10:00:30 +08:00
2024-04-07 01:16:45 +02:00
2024-07-05 19:40:09 +00:00
2024-04-24 22:21:15 +00:00
2024-04-10 00:41:27 +00:00
2024-03-27 14:02:16 +00:00
2024-07-05 20:58:33 +00:00
2024-07-06 14:24:20 +02:00
2024-07-05 20:58:33 +00:00
2024-04-08 15:04:44 -07:00
2024-07-04 02:41:13 +00:00
2024-04-15 08:54:11 -04:00
2024-05-29 22:26:54 +00:00
2024-07-04 02:41:13 +00:00
2024-07-12 21:16:09 -04:00
2024-07-12 21:16:09 -04:00
2024-06-20 04:25:17 +00:00
2024-07-09 17:21:31 -06:00
2024-04-10 00:41:27 +00:00
2024-05-30 22:52:33 +02:00
2024-05-30 22:52:33 +02:00
2024-05-30 22:52:33 +02:00
2024-05-30 22:52:33 +02:00
2024-05-29 22:26:54 +00:00
2024-06-12 12:34:47 +00:00
2024-04-24 22:21:15 +00:00
2024-04-24 22:21:15 +00:00
2024-05-04 11:30:38 +02:00
2024-05-30 22:52:33 +02:00
2024-05-30 22:52:33 +02:00
2024-04-30 12:46:59 +05:30
2024-07-11 20:39:24 +00:00
2024-07-11 20:39:24 +00:00
2024-07-11 20:39:24 +00:00
2024-07-09 17:21:31 -06:00
2024-04-12 12:59:40 +09:00
2024-07-11 12:23:44 +10:00
2024-07-11 12:23:44 +10:00
2024-05-30 22:52:33 +02:00
2024-05-30 22:52:33 +02:00
2024-07-12 03:02:57 +00:00
2024-04-29 14:53:38 +02:00
2024-05-30 22:52:33 +02:00
2024-05-30 22:52:33 +02:00
2024-07-11 20:39:24 +00:00
2024-05-28 12:31:33 +02:00
2024-06-12 12:34:47 +00:00
2024-04-30 12:46:59 +05:30
2024-06-03 09:49:04 -04:00
2024-06-03 09:49:04 -04:00
2024-04-11 16:41:41 +00:00
2024-04-30 22:27:19 +02:00
2024-06-20 04:25:17 +00:00
2024-04-22 18:48:47 +02:00
2024-06-17 22:35:25 -04:00
2024-06-17 22:35:25 -04:00
2024-04-09 10:23:58 +00:00
2024-04-09 10:23:58 +00:00
2024-06-25 23:29:44 +08:00
2024-04-25 11:49:12 -04:00
2024-04-25 11:49:12 -04:00
2024-06-19 04:41:56 +00:00
2024-06-19 14:58:29 +00:00