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