rust/src/test/ui/underscore-lifetime/in-struct.rs
2018-12-25 21:08:33 -07:00

14 lines
240 B
Rust

// Check that the `'_` used in structs/enums gives an error.
use std::fmt::Debug;
struct Foo {
x: &'_ u32, //~ ERROR missing lifetime specifier
}
enum Bar {
Variant(&'_ u32), //~ ERROR missing lifetime specifier
}
fn main() { }