14 lines
240 B
Rust
Raw Normal View History

// Check that the `'_` used in structs/enums gives an error.
use std::fmt::Debug;
struct Foo {
2018-10-19 16:43:46 -04:00
x: &'_ u32, //~ ERROR missing lifetime specifier
}
2018-10-19 16:39:41 -04:00
enum Bar {
2018-10-19 16:43:46 -04:00
Variant(&'_ u32), //~ ERROR missing lifetime specifier
}
fn main() { }