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

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

20 lines
402 B
Rust
Raw Normal View History

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