blob: 9d722a0287a5cf4202ad37149668f96a19c3924d (
plain)
1
2
3
4
5
6
7
8
9
10
11
|
fn main() {
let a = "a";
let b = "b";
println!("{a} {b} {} {} {c} {}", c = "c");
//~^ ERROR: 3 positional arguments in format string, but there is 1 argument
let n = 1;
println!("{a:.n$} {b:.*}");
//~^ ERROR: 1 positional argument in format string, but no arguments were given
}
|