about summary refs log tree commit diff
path: root/tests/ui/span
diff options
context:
space:
mode:
authorlong-long-float <niinikazuki@yahoo.co.jp>2024-05-12 16:40:59 +0900
committerlong-long-float <niinikazuki@yahoo.co.jp>2024-07-14 13:50:09 +0900
commit332b41dbce936647232311a51b0febcd3615d731 (patch)
treec19aea8c54ddcc493e6adc9db9d6888bd7c1e618 /tests/ui/span
parent336e89bd1518f2cd81574384037b3cffe03c63a8 (diff)
downloadrust-332b41dbce936647232311a51b0febcd3615d731.tar.gz
rust-332b41dbce936647232311a51b0febcd3615d731.zip
Use ordinal number in argument error
Fix error message

Fix tests

Format
Diffstat (limited to 'tests/ui/span')
-rw-r--r--tests/ui/span/issue-34264.stderr4
-rw-r--r--tests/ui/span/missing-unit-argument.stderr10
2 files changed, 7 insertions, 7 deletions
diff --git a/tests/ui/span/issue-34264.stderr b/tests/ui/span/issue-34264.stderr
index 89c67719b5a..b581cdd0be2 100644
--- a/tests/ui/span/issue-34264.stderr
+++ b/tests/ui/span/issue-34264.stderr
@@ -54,7 +54,7 @@ error[E0061]: this function takes 2 arguments but 3 arguments were supplied
   --> $DIR/issue-34264.rs:7:5
    |
 LL |     foo(Some(42), 2, "");
-   |     ^^^              -- unexpected argument of type `&'static str`
+   |     ^^^              -- unexpected argument #3 of type `&'static str`
    |
 note: function defined here
   --> $DIR/issue-34264.rs:1:4
@@ -85,7 +85,7 @@ error[E0061]: this function takes 2 arguments but 3 arguments were supplied
   --> $DIR/issue-34264.rs:10:5
    |
 LL |     bar(1, 2, 3);
-   |     ^^^       - unexpected argument of type `{integer}`
+   |     ^^^       - unexpected argument #3 of type `{integer}`
    |
 note: function defined here
   --> $DIR/issue-34264.rs:3:4
diff --git a/tests/ui/span/missing-unit-argument.stderr b/tests/ui/span/missing-unit-argument.stderr
index ff89f775334..79980f48ab6 100644
--- a/tests/ui/span/missing-unit-argument.stderr
+++ b/tests/ui/span/missing-unit-argument.stderr
@@ -2,7 +2,7 @@ error[E0061]: this enum variant takes 1 argument but 0 arguments were supplied
   --> $DIR/missing-unit-argument.rs:11:33
    |
 LL |     let _: Result<(), String> = Ok();
-   |                                 ^^-- an argument of type `()` is missing
+   |                                 ^^-- argument #1 of type `()` is missing
    |
 note: tuple variant defined here
   --> $SRC_DIR/core/src/result.rs:LL:COL
@@ -31,7 +31,7 @@ error[E0061]: this function takes 2 arguments but 1 argument was supplied
   --> $DIR/missing-unit-argument.rs:13:5
    |
 LL |     foo(());
-   |     ^^^---- an argument of type `()` is missing
+   |     ^^^---- argument #2 of type `()` is missing
    |
 note: function defined here
   --> $DIR/missing-unit-argument.rs:1:4
@@ -47,7 +47,7 @@ error[E0061]: this function takes 1 argument but 0 arguments were supplied
   --> $DIR/missing-unit-argument.rs:14:5
    |
 LL |     bar();
-   |     ^^^-- an argument of type `()` is missing
+   |     ^^^-- argument #1 of type `()` is missing
    |
 note: function defined here
   --> $DIR/missing-unit-argument.rs:2:4
@@ -63,7 +63,7 @@ error[E0061]: this method takes 1 argument but 0 arguments were supplied
   --> $DIR/missing-unit-argument.rs:15:7
    |
 LL |     S.baz();
-   |       ^^^-- an argument of type `()` is missing
+   |       ^^^-- argument #1 of type `()` is missing
    |
 note: method defined here
   --> $DIR/missing-unit-argument.rs:6:8
@@ -79,7 +79,7 @@ error[E0061]: this method takes 1 argument but 0 arguments were supplied
   --> $DIR/missing-unit-argument.rs:16:7
    |
 LL |     S.generic::<()>();
-   |       ^^^^^^^^^^^^^-- an argument of type `()` is missing
+   |       ^^^^^^^^^^^^^-- argument #1 of type `()` is missing
    |
 note: method defined here
   --> $DIR/missing-unit-argument.rs:7:8