Skip to content

Commit

Permalink
Add E0107 tests for multiple lifetime params
Browse files Browse the repository at this point in the history
  • Loading branch information
ojsheikh committed Aug 5, 2016
1 parent 3575812 commit 2061d65
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/test/compile-fail/E0107.rs
Expand Up @@ -9,20 +9,27 @@
// except according to those terms.

struct Foo<'a>(&'a str);
struct Buzz<'a, 'b>(&'a str, &'b str);

enum Bar {
A,
B,
C,
}

struct Baz<'a> {
struct Baz<'a, 'b, 'c> {
foo: Foo,
//~^ ERROR E0107
//~| expected 1 lifetime parameter
buzz: Buzz<'a>,
//~^ ERROR E0107
//~| expected 2 lifetime parameters
bar: Bar<'a>,
//~^ ERROR E0107
//~| unexpected lifetime parameter
foo2: Foo<'a, 'b, 'c>,
//~^ ERROR E0107
//~| 2 unexpected lifetime parameters
}

fn main() {
Expand Down

0 comments on commit 2061d65

Please sign in to comment.