2023-08-28 16:37:03 +00:00
|
|
|
fn main() {
|
|
|
|
let x = 0;
|
|
|
|
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
|
|
|
|
|
|
|
let y = 0;
|
|
|
|
println!("{x} {y}", x, y);
|
2023-10-04 13:47:53 +00:00
|
|
|
//~^ ERROR: redundant argument
|
2023-08-28 16:37:03 +00:00
|
|
|
|
|
|
|
let y = 0;
|
|
|
|
println!("{} {} {x} {y} {}", x, x, x, y, y);
|
2023-10-04 13:47:53 +00:00
|
|
|
//~^ ERROR: redundant argument
|
2023-08-28 16:37:03 +00:00
|
|
|
}
|