2022-01-27 23:51:11 +01:00
|
|
|
fn main() {
|
|
|
|
let a = "a";
|
|
|
|
let b = "b";
|
|
|
|
|
|
|
|
println!("{a} {b} {} {} {c} {}", c = "c");
|
2022-08-26 18:52:08 +02:00
|
|
|
//~^ ERROR: 3 positional arguments in format string, but there is 1 argument
|
2022-01-27 23:59:34 +01:00
|
|
|
|
|
|
|
let n = 1;
|
|
|
|
println!("{a:.n$} {b:.*}");
|
2022-08-26 18:52:08 +02:00
|
|
|
//~^ ERROR: 1 positional argument in format string, but no arguments were given
|
2022-01-27 23:51:11 +01:00
|
|
|
}
|