mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-25 16:24:46 +00:00
12 lines
309 B
Rust
12 lines
309 B
Rust
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
|
|
}
|