22 lines
395 B
Rust
22 lines
395 B
Rust
|
// run-rustfix
|
||
|
|
||
|
fn main() {
|
||
|
let x = 0;
|
||
|
let y = 0;
|
||
|
|
||
|
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
|
||
|
}
|