1
Fork 0
rust/src/test/ui/error-codes/E0107.rs

25 lines
611 B
Rust
Raw Normal View History

2016-05-25 13:58:07 +02:00
struct Foo<'a>(&'a str);
struct Buzz<'a, 'b>(&'a str, &'b str);
2016-05-25 13:58:07 +02:00
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
2016-08-05 20:54:04 +05:00
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
2016-05-25 13:58:07 +02:00
}
2018-07-24 02:59:22 +01:00
fn main() {}