rust/tests/ui/did_you_mean/issue-105225.rs
2023-10-05 16:11:31 +02:00

22 lines
406 B
Rust

// run-rustfix
fn main() {
let x = 0;
let y = 0;
println!("{x}", x);
//~^ ERROR: redundant argument
println!("{x} {}", x, x);
//~^ ERROR: redundant argument
println!("{} {x}", x, x);
//~^ ERROR: redundant argument
println!("{x} {y}", x, y);
//~^ ERROR: redundant arguments
println!("{} {} {x} {y} {}", x, x, x, y, y);
//~^ ERROR: redundant arguments
}