]> git.lizzy.rs Git - rust.git/blob - src/test/ui/error-codes/E0107.rs
Rollup merge of #82259 - osa1:issue82156, r=petrochenkov
[rust.git] / src / test / ui / error-codes / E0107.rs
1 struct Foo<'a>(&'a str);
2 struct Buzz<'a, 'b>(&'a str, &'b str);
3
4 enum Bar {
5     A,
6     B,
7     C,
8 }
9
10 struct Baz<'a, 'b, 'c> {
11     buzz: Buzz<'a>,
12     //~^ ERROR this struct takes 2 lifetime arguments but only 1 lifetime argument was supplied
13     //~| HELP add missing lifetime argument
14
15     bar: Bar<'a>,
16     //~^ ERROR this enum takes 0 lifetime arguments but 1 lifetime argument was supplied
17     //~| HELP remove these generics
18
19     foo2: Foo<'a, 'b, 'c>,
20     //~^ ERROR this struct takes 1 lifetime argument but 3 lifetime arguments were supplied
21     //~| HELP remove these lifetime arguments
22 }
23
24 fn main() {}