summary refs log tree commit diff
path: root/src/test/ui/error-codes/E0107.rs
blob: c3dde72599b71d719f3d9a8b0c8908dcf3c33462 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
struct Foo<'a>(&'a str);
struct Buzz<'a, 'b>(&'a str, &'b str);

enum Bar {
    A,
    B,
    C,
}

struct Baz<'a, 'b, 'c> {
    buzz: Buzz<'a>,
    //~^ ERROR this struct takes 2 lifetime arguments but only 1 lifetime argument was supplied
    //~| HELP add missing lifetime argument

    bar: Bar<'a>,
    //~^ ERROR this enum takes 0 lifetime arguments but 1 lifetime argument was supplied
    //~| HELP remove these generics

    foo2: Foo<'a, 'b, 'c>,
    //~^ ERROR this struct takes 1 lifetime argument but 3 lifetime arguments were supplied
    //~| HELP remove these lifetime arguments
}

fn main() {}