]> git.lizzy.rs Git - rust.git/blob - src/test/ui/underscore-lifetime/in-struct.rs
Merge commit '40dd3e2b7089b5e96714e064b731f6dbf17c61a9' into sync_cg_clif-2021-05-27
[rust.git] / src / test / ui / underscore-lifetime / in-struct.rs
1 // Check that the `'_` used in structs/enums gives an error.
2
3 use std::fmt::Debug;
4
5 struct Foo {
6     x: &'_ u32, //~ ERROR missing lifetime specifier
7 }
8
9 enum Bar {
10     Variant(&'_ u32), //~ ERROR missing lifetime specifier
11 }
12
13 fn main() { }