rust/tests/ui/extern
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
..
auxiliary [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
extern_fat_drop.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
extern-1.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
extern-C-non-FFI-safe-arg-ice-52334.rs Always use a colon in //@ normalize-*: headers 2024-07-11 12:23:44 +10:00
extern-C-non-FFI-safe-arg-ice-52334.stderr add issue numbers via // issue: rust-lang/rust#ISSUE_NUM directive 2024-03-24 09:34:11 +01:00
extern-C-str-arg-ice-80125.rs add issue numbers via // issue: rust-lang/rust#ISSUE_NUM directive 2024-03-24 09:34:11 +01:00
extern-C-str-arg-ice-80125.stderr add test for str as extern "C" arg causes compiler panic #80125 2024-03-24 09:23:12 +01:00
extern-calling-convention-test.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
extern-compare-with-return-type.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
extern-const.fixed Use the rustc_private libc less in tests 2024-04-15 08:54:11 -04:00
extern-const.rs Use the rustc_private libc less in tests 2024-04-15 08:54:11 -04:00
extern-const.stderr Make parse error suggestions verbose and fix spans 2024-07-12 03:02:57 +00:00
extern-crate-multiple-missing.rs
extern-crate-multiple-missing.stderr
extern-crate-rename.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
extern-crate-rename.stderr
extern-crate-visibility.rs
extern-crate-visibility.stderr
extern-ffi-fn-with-body.rs
extern-ffi-fn-with-body.stderr
extern-foreign-crate.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
extern-macro.rs
extern-macro.stderr
extern-main-fn.rs
extern-main-fn.stderr
extern-main-issue-86110.rs
extern-main-issue-86110.stderr
extern-methods.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
extern-mod-abi.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
extern-mod-ordering-exe.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
extern-no-mangle.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
extern-no-mangle.stderr
extern-prelude-core.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
extern-prelude-no-speculative.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
extern-prelude-std.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
extern-pub.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
extern-rust.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
extern-static-size-overflow.rs
extern-static-size-overflow.stderr
extern-take-value.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
extern-thiscall.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
extern-type-diag-not-similar.rs
extern-type-diag-not-similar.stderr
extern-types-distinct-types.rs
extern-types-distinct-types.stderr
extern-types-field-offset.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
extern-types-field-offset.run.stderr test that both size_of_val and align_of_val panic 2023-12-12 17:19:19 +01:00
extern-types-inherent-impl.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
extern-types-manual-sync-send.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
extern-types-not-sync-send.rs
extern-types-not-sync-send.stderr
extern-types-pointer-cast.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
extern-types-size_of_val.align.run.stderr test that both size_of_val and align_of_val panic 2023-12-12 17:19:19 +01:00
extern-types-size_of_val.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
extern-types-size_of_val.size.run.stderr test that both size_of_val and align_of_val panic 2023-12-12 17:19:19 +01:00
extern-types-thin-pointer.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
extern-types-trait-impl.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
extern-types-unsized.rs
extern-types-unsized.stderr review comment: change wording 2024-02-01 03:31:03 +00:00
extern-vectorcall.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
extern-with-type-bounds.rs
extern-with-type-bounds.stderr
extern-wrong-value-type.rs
extern-wrong-value-type.stderr Use parenthetical notation for Fn traits 2024-05-29 22:26:54 +00:00
issue-1251.rs Remove libc from rust_get_test_int uses 2024-04-17 09:18:14 -04:00
issue-10025.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-10763.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-10764-rpass.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-13655.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-16250.rs Move some tests 2024-02-09 15:43:08 -03:00
issue-16250.stderr Move some tests 2024-02-09 15:43:08 -03:00
issue-18576.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-18819.rs Move tests 2024-02-13 18:08:25 -03:00
issue-18819.stderr Use ordinal number in argument error 2024-07-14 13:50:09 +09:00
issue-28324.rs Always evaluate free constants and statics, even if previous errors occurred 2024-02-19 22:11:13 +00:00
issue-28324.stderr Always evaluate free constants and statics, even if previous errors occurred 2024-02-19 22:11:13 +00:00
issue-36122-accessing-externed-dst.rs Continue compilation after check_mod_type_wf errors 2024-02-14 11:00:30 +00:00
issue-36122-accessing-externed-dst.stderr Continue compilation after check_mod_type_wf errors 2024-02-14 11:00:30 +00:00
issue-47725.rs Move some tests 2024-02-09 15:43:08 -03:00
issue-47725.stderr Move some tests 2024-02-09 15:43:08 -03:00
issue-64655-allow-unwind-when-calling-panic-directly.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-64655-extern-rust-must-allow-unwind.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-80074.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-80074.stderr exclude unexported macro bindings from extern crate 2024-01-21 20:24:40 +08:00
issue-95829.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-95829.stderr Fix diagnostic for qualifier in extern block 2024-04-04 11:58:38 +02:00
issue-112363-extern-item-where-clauses-debug-ice.rs
issue-112363-extern-item-where-clauses-debug-ice.stderr Bless tests 2024-01-13 12:46:58 -05:00
issue-116203.rs
issue-116203.stderr
no-mangle-associated-fn.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
no-mangle-associated-fn.stderr Update tests 2024-02-07 10:42:01 +08:00
not-in-block.rs
not-in-block.stderr