summaryrefslogtreecommitdiffstats
path: root/src/test/ui/generics/generic-arg-mismatch-recover.rs
blob: 2cf7f1d657b187409411943c86c49dee53704a08 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
struct Foo<'a, T: 'a>(&'a T);

struct Bar<'a>(&'a ());

fn main() {
    Foo::<'static, 'static, ()>(&0);
    //~^ ERROR this struct takes 1 lifetime argument but 2 lifetime arguments were supplied

    Bar::<'static, 'static, ()>(&());
    //~^ ERROR this struct takes 1 lifetime argument but 2 lifetime arguments were supplied
    //~| ERROR this struct takes 0
}