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