2023-10-05 14:59:15 +02:00
|
|
|
// run-rustfix
|
|
|
|
|
|
|
|
fn main() {
|
2023-10-05 15:46:34 +02:00
|
|
|
let x = "x";
|
|
|
|
let y = "y";
|
2023-10-05 14:59:15 +02:00
|
|
|
|
|
|
|
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
|
|
|
|
}
|