mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-01 23:12:02 +00:00
22 lines
400 B
Rust
22 lines
400 B
Rust
//@ run-rustfix
|
|
|
|
fn main() {
|
|
let x = "x";
|
|
let y = "y";
|
|
|
|
println!("{x}", );
|
|
//~^ ERROR: redundant argument
|
|
|
|
println!("{x} {}", x, );
|
|
//~^ ERROR: redundant argument
|
|
|
|
println!("{} {x}", x, );
|
|
//~^ ERROR: redundant argument
|
|
|
|
println!("{x} {y}", );
|
|
//~^ ERROR: redundant arguments
|
|
|
|
println!("{} {} {x} {y} {}", x, x, x, );
|
|
//~^ ERROR: redundant arguments
|
|
}
|