mirror of
https://github.com/rust-lang/rust.git
synced 2025-01-11 07:21:51 +00:00
Add tests for underscore lifetimes in impl headers and struct definitions
This commit is contained in:
parent
06926b6298
commit
f5505d185c
@ -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<'_>) {}
|
||||
|
Loading…
Reference in New Issue
Block a user