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