Skip to content

Commit

Permalink
Add tests for underscore lifetimes in impl headers and struct definit…
Browse files Browse the repository at this point in the history
…ions
  • Loading branch information
cramertj committed Sep 21, 2017
1 parent 06926b6 commit f5505d1
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/test/compile-fail/underscore-lifetime-binders.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@
#![feature(underscore_lifetimes)]

struct Foo<'a>(&'a u8);
struct Baz<'a>(&'_ &'a u8); //~ ERROR missing lifetime specifier

impl Foo<'_> { //~ ERROR missing lifetime specifier
fn x() {}
}

fn foo<'_> //~ ERROR invalid lifetime parameter name: `'_`
(_: Foo<'_>) {}
Expand Down

0 comments on commit f5505d1

Please sign in to comment.