rust/tests/ui/did_you_mean/issue-105225.fixed

22 lines
400 B
Rust
Raw Normal View History

//@ run-rustfix
2023-10-05 07:59:15 -05:00
fn main() {
let x = "x";
let y = "y";
2023-10-05 07:59:15 -05:00
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
}