File tree Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Original file line number Diff line number Diff 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}
Original file line number Diff line number Diff 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 |
263263LL | 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
You can’t perform that action at this time.
0 commit comments