Skip to content

Commit 1406563

Browse files
committed
Update test.
1 parent c1c6e3a commit 1406563

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

Diff for: src/test/ui/fmt/ifmt-bad-arg.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -95,5 +95,5 @@ tenth number: {}",
9595
println!("{:.*}");
9696
//~^ ERROR 2 positional arguments in format string, but no arguments were given
9797
println!("{:.0$}");
98-
//~^ ERROR 1 positional argument in format string, but no arguments were given
98+
//~^ ERROR invalid reference to positional argument 0 (no arguments were given)
9999
}

Diff for: src/test/ui/fmt/ifmt-bad-arg.stderr

+3-5
Original file line numberDiff line numberDiff line change
@@ -257,13 +257,11 @@ LL | println!("{:.*}");
257257
= note: positional arguments are zero-based
258258
= note: for information about formatting flags, visit https://doc.rust-lang.org/std/fmt/index.html
259259

260-
error: 1 positional argument in format string, but no arguments were given
261-
--> $DIR/ifmt-bad-arg.rs:97:15
260+
error: invalid reference to positional argument 0 (no arguments were given)
261+
--> $DIR/ifmt-bad-arg.rs:97:16
262262
|
263263
LL | println!("{:.0$}");
264-
| ^^---^
265-
| |
266-
| this precision flag expects an `usize` argument at position 0, but no arguments were given
264+
| ^^^^
267265
|
268266
= note: positional arguments are zero-based
269267
= note: for information about formatting flags, visit https://doc.rust-lang.org/std/fmt/index.html

0 commit comments

Comments
 (0)