mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-15 12:39:31 +03:00
Add tests for underscore lifetimes in impl headers and struct definitions
This commit is contained in:
@@ -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<'_>) {}
|
||||
|
||||
Reference in New Issue
Block a user