Update test.

This commit is contained in:
Mara Bos 2022-09-06 23:08:27 +02:00
parent c1c6e3ae7c
commit 14065639ca
2 changed files with 4 additions and 6 deletions

View File

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

View File

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