diff options
| author | Mara Bos <m-ou.se@m-ou.se> | 2022-08-08 16:17:08 +0200 |
|---|---|---|
| committer | Mara Bos <m-ou.se@m-ou.se> | 2022-09-27 13:13:08 +0200 |
| commit | 9bec0de3977e589fb92fc85ce9bc8fa99c3691f6 (patch) | |
| tree | ba52134752254b6fed558b11f15794a04f5242b5 /src/test | |
| parent | d9297d22ad9edc2b56f0dd8734c1187a0c88be69 (diff) | |
| download | rust-9bec0de3977e589fb92fc85ce9bc8fa99c3691f6.tar.gz rust-9bec0de3977e589fb92fc85ce9bc8fa99c3691f6.zip | |
Rewrite and refactor format_args!() builtin macro.
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/ui/fmt/ifmt-bad-arg.stderr | 14 | ||||
| -rw-r--r-- | src/test/ui/macros/format-parse-errors.stderr | 2 |
2 files changed, 8 insertions, 8 deletions
diff --git a/src/test/ui/fmt/ifmt-bad-arg.stderr b/src/test/ui/fmt/ifmt-bad-arg.stderr index dbb4bc6d937..af645c2ba3a 100644 --- a/src/test/ui/fmt/ifmt-bad-arg.stderr +++ b/src/test/ui/fmt/ifmt-bad-arg.stderr @@ -117,20 +117,20 @@ LL | format!("{} {}", 1, 2, foo=1, bar=2); | multiple missing formatting specifiers error: duplicate argument named `foo` - --> $DIR/ifmt-bad-arg.rs:40:33 + --> $DIR/ifmt-bad-arg.rs:40:29 | LL | format!("{foo}", foo=1, foo=2); - | - ^ duplicate argument - | | - | previously here + | --- ^^^ duplicate argument + | | + | previously here error: positional arguments cannot follow named arguments --> $DIR/ifmt-bad-arg.rs:41:35 | LL | format!("{foo} {} {}", foo=1, 2); - | - ^ positional arguments must be before named arguments - | | - | named argument + | ----- ^ positional arguments must be before named arguments + | | + | named argument error: named argument never used --> $DIR/ifmt-bad-arg.rs:45:51 diff --git a/src/test/ui/macros/format-parse-errors.stderr b/src/test/ui/macros/format-parse-errors.stderr index 1a7578e6076..f9ea4c63377 100644 --- a/src/test/ui/macros/format-parse-errors.stderr +++ b/src/test/ui/macros/format-parse-errors.stderr @@ -22,7 +22,7 @@ error: positional arguments cannot follow named arguments --> $DIR/format-parse-errors.rs:10:9 | LL | foo = foo, - | --- named argument + | --------- named argument LL | bar, | ^^^ positional arguments must be before named arguments |
