mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-28 01:34:21 +00:00
14 lines
240 B
Rust
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() { }
|