2016-05-25 13:58:07 +02:00
|
|
|
struct Foo<'a>(&'a str);
|
2016-08-05 22:56:10 +05:00
|
|
|
struct Buzz<'a, 'b>(&'a str, &'b str);
|
2016-05-25 13:58:07 +02:00
|
|
|
|
|
|
|
enum Bar {
|
|
|
|
A,
|
|
|
|
B,
|
|
|
|
C,
|
|
|
|
}
|
|
|
|
|
2016-08-05 22:56:10 +05:00
|
|
|
struct Baz<'a, 'b, 'c> {
|
|
|
|
buzz: Buzz<'a>,
|
2021-01-02 19:45:11 +01:00
|
|
|
//~^ ERROR this struct takes 2 lifetime arguments but only 1 lifetime argument was supplied
|
|
|
|
//~| HELP add missing lifetime argument
|
|
|
|
|
2016-08-05 20:54:04 +05:00
|
|
|
bar: Bar<'a>,
|
2021-01-02 19:45:11 +01:00
|
|
|
//~^ ERROR this enum takes 0 lifetime arguments but 1 lifetime argument was supplied
|
|
|
|
//~| HELP remove these generics
|
|
|
|
|
2016-08-05 22:56:10 +05:00
|
|
|
foo2: Foo<'a, 'b, 'c>,
|
2021-01-02 19:45:11 +01:00
|
|
|
//~^ ERROR this struct takes 1 lifetime argument but 3 lifetime arguments were supplied
|
|
|
|
//~| HELP remove these lifetime arguments
|
2016-05-25 13:58:07 +02:00
|
|
|
}
|
|
|
|
|
2018-07-24 02:59:22 +01:00
|
|
|
fn main() {}
|