rust/src/test/ui/error-codes/E0107.rs

25 lines
493 B
Rust
Raw Normal View History

2016-05-25 11:58:07 +00:00
struct Foo<'a>(&'a str);
struct Buzz<'a, 'b>(&'a str, &'b str);
2016-05-25 11:58:07 +00:00
enum Bar {
A,
B,
C,
}
struct Baz<'a, 'b, 'c> {
buzz: Buzz<'a>,
2021-02-18 20:01:44 +00:00
//~^ ERROR this struct takes 2 lifetime arguments
//~| 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
//~| HELP remove these generics
foo2: Foo<'a, 'b, 'c>,
2021-02-18 20:01:44 +00:00
//~^ ERROR this struct takes 1 lifetime argument
//~| HELP remove these lifetime arguments
2016-05-25 11:58:07 +00:00
}
2018-07-24 01:59:22 +00:00
fn main() {}