Closed
Description
I tried this code:
fn main() {
let a = "a";
let b = "b";
println!("{a} {b} {} {} {c} {}", c = "c");
}
I expected to see a compile error that says that there are missing positional arguments or that it is prohibited to mix positional and named parameters.
Instead, this compiles and prints the following:
a b c a c b
This code is available on the playground.
Meta
rustc --version --verbose
:
rustc 1.58.1 (db9d1b20b 2022-01-20)
binary: rustc
commit-hash: db9d1b20bba1968c1ec1fc49616d4742c1725b4b
commit-date: 2022-01-20
host: x86_64-unknown-linux-gnu
release: 1.58.1
LLVM version: 13.0.0