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