]> git.lizzy.rs Git - rust.git/blob - src/test/ui/fmt/format-args-capture-issue-93378.stderr
Auto merge of #95454 - randomicon00:fix95444, r=wesleywiser
[rust.git] / src / test / ui / fmt / format-args-capture-issue-93378.stderr
1 error: invalid reference to positional arguments 1 and 2 (there is 1 argument)
2   --> $DIR/format-args-capture-issue-93378.rs:5:26
3    |
4 LL |     println!("{a} {b} {} {} {c} {}", c = "c");
5    |                          ^^     ^^
6    |
7    = note: positional arguments are zero-based
8
9 error: invalid reference to positional argument 0 (no arguments were given)
10   --> $DIR/format-args-capture-issue-93378.rs:9:23
11    |
12 LL |     println!("{a:.n$} {b:.*}");
13    |                   -   ^^^--^
14    |                   |      |
15    |                   |      this precision flag adds an extra required argument at position 0, which is why there are 3 arguments expected
16    |                   this parameter corresponds to the precision flag
17    |
18    = note: positional arguments are zero-based
19    = note: for information about formatting flags, visit https://doc.rust-lang.org/std/fmt/index.html
20
21 error: aborting due to 2 previous errors
22