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