Skip to content

Commit 2061d65

Browse files
committed
Add E0107 tests for multiple lifetime params
1 parent 3575812 commit 2061d65

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/test/compile-fail/E0107.rs

+8-1
Original file line numberDiff line numberDiff line change
@@ -9,20 +9,27 @@
99
// except according to those terms.
1010

1111
struct Foo<'a>(&'a str);
12+
struct Buzz<'a, 'b>(&'a str, &'b str);
1213

1314
enum Bar {
1415
A,
1516
B,
1617
C,
1718
}
1819

19-
struct Baz<'a> {
20+
struct Baz<'a, 'b, 'c> {
2021
foo: Foo,
2122
//~^ ERROR E0107
2223
//~| expected 1 lifetime parameter
24+
buzz: Buzz<'a>,
25+
//~^ ERROR E0107
26+
//~| expected 2 lifetime parameters
2327
bar: Bar<'a>,
2428
//~^ ERROR E0107
2529
//~| unexpected lifetime parameter
30+
foo2: Foo<'a, 'b, 'c>,
31+
//~^ ERROR E0107
32+
//~| 2 unexpected lifetime parameters
2633
}
2734

2835
fn main() {

0 commit comments

Comments
 (0)