summaryrefslogtreecommitdiffstats
path: root/tests/ui/did_you_mean/issue-105225.rs
blob: 91cdf0eb28f6fbcf6533adb5de520ef77f86ba20 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// run-rustfix

fn main() {
    let x = "x";
    let y = "y";

    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
}