about summary refs log tree commit diff
path: root/tests/ui/did_you_mean/issue-105225.fixed
blob: 54bd254c8e40b1a0e8885e49dad6b845ffdfe67a (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}", );
    //~^ 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
}