2024-02-16 14:02:50 -06:00
|
|
|
//@ run-rustfix
|
2023-10-05 07:59:15 -05:00
|
|
|
|
|
|
|
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
|
|
|
|
}
|