]> git.lizzy.rs Git - rust.git/blob - src/test/ui/underscore-lifetime/in-struct.rs
Merge commit 'd3a2366ee877075c59b38bd8ced55f224fc7ef51' into sync_cg_clif-2022-07-26
[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() { }