2023-10-05 07:59:15 -05:00
|
|
|
// run-rustfix
|
|
|
|
|
2023-08-28 11:37:03 -05:00
|
|
|
fn main() {
|
2023-10-05 08:46:34 -05:00
|
|
|
let x = "x";
|
|
|
|
let y = "y";
|
2023-10-05 07:36:50 -05:00
|
|
|
|
2023-08-28 11:37:03 -05:00
|
|
|
println!("{x}", x);
|
2023-10-04 08:47:53 -05:00
|
|
|
//~^ ERROR: redundant argument
|
2023-08-28 11:37:03 -05:00
|
|
|
|
|
|
|
println!("{x} {}", x, x);
|
2023-10-04 08:47:53 -05:00
|
|
|
//~^ ERROR: redundant argument
|
2023-08-28 11:37:03 -05:00
|
|
|
|
|
|
|
println!("{} {x}", x, x);
|
2023-10-04 08:47:53 -05:00
|
|
|
//~^ ERROR: redundant argument
|
2023-08-28 11:37:03 -05:00
|
|
|
|
|
|
|
println!("{x} {y}", x, y);
|
2023-10-05 07:36:50 -05:00
|
|
|
//~^ ERROR: redundant arguments
|
2023-08-28 11:37:03 -05:00
|
|
|
|
|
|
|
println!("{} {} {x} {y} {}", x, x, x, y, y);
|
2023-10-05 07:36:50 -05:00
|
|
|
//~^ ERROR: redundant arguments
|
2023-08-28 11:37:03 -05:00
|
|
|
}
|