rust/tests/ui/fn
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
..
bad-main.rs
bad-main.stderr
dyn-fn-alignment.rs
expr-fn-panic.rs
expr-fn.rs
fn_def_coercion.rs
fn_def_coercion.stderr
fn_def_opaque_coercion_to_fn_ptr.rs
fn_def_opaque_coercion_to_fn_ptr.stderr
fn_def_opaque_coercion.rs
fn-bad-block-type.rs
fn-bad-block-type.stderr
fn-closure-mutable-capture.rs
fn-closure-mutable-capture.stderr
fn-compare-mismatch.rs
fn-compare-mismatch.stderr
fn-item-type.rs
fn-item-type.stderr
fn-pointer-mismatch.rs
fn-pointer-mismatch.stderr
fn-ptr-trait-int-float-infer-var.rs
fn-ptr-trait.rs
fn-recover-return-sign2.rs
fn-recover-return-sign2.stderr Make parse error suggestions verbose and fix spans 2024-07-12 03:02:57 +00:00
fn-recover-return-sign.fixed Make parse error suggestions verbose and fix spans 2024-07-12 03:02:57 +00:00
fn-recover-return-sign.rs
fn-recover-return-sign.stderr Make parse error suggestions verbose and fix spans 2024-07-12 03:02:57 +00:00
fn-trait-formatting.rs
fn-trait-formatting.stderr
fun-call-variants.rs
implied-bounds-impl-header-projections.rs
implied-bounds-unnorm-associated-type-2.rs
implied-bounds-unnorm-associated-type-2.stderr
implied-bounds-unnorm-associated-type-3.rs
implied-bounds-unnorm-associated-type-4.rs
implied-bounds-unnorm-associated-type-4.stderr
implied-bounds-unnorm-associated-type-5.rs
implied-bounds-unnorm-associated-type-5.stderr
implied-bounds-unnorm-associated-type.rs
implied-bounds-unnorm-associated-type.stderr
issue-1451.rs
issue-1900.rs
issue-1900.stderr
issue-3044.rs
issue-3044.stderr Use ordinal number in argument error 2024-07-14 13:50:09 +09:00
issue-3099.rs
issue-3099.stderr
issue-3904.rs
issue-39259.rs
issue-39259.stderr
issue-80179.rs
issue-80179.stderr
keyword-order.rs
keyword-order.stderr
nested-function-names-issue-8587.rs
signature-error-reporting-under-verbose.rs
signature-error-reporting-under-verbose.stderr
suggest-return-closure.rs
suggest-return-closure.stderr
suggest-return-future.rs
suggest-return-future.stderr