diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2024-07-17 16:22:26 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-07-17 16:22:26 +0200 |
| commit | 2b34490da6c3a10890adb48b911d6b0a1e91c752 (patch) | |
| tree | 5866c02fa9e272d86bcad0125a80c0bfd588937f /compiler/rustc_codegen_gcc | |
| parent | 3de0a7c716daab58bdb6551b0d0af6a466486639 (diff) | |
| parent | 332b41dbce936647232311a51b0febcd3615d731 (diff) | |
| download | rust-2b34490da6c3a10890adb48b911d6b0a1e91c752.tar.gz rust-2b34490da6c3a10890adb48b911d6b0a1e91c752.zip | |
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.
Diffstat (limited to 'compiler/rustc_codegen_gcc')
0 files changed, 0 insertions, 0 deletions
