]> git.lizzy.rs Git - rust.git/blob - src/test/ui/rfc-2093-infer-outlives/nested-union.rs
Rollup merge of #56044 - matthewjasper:function-param-drop-order, r=cramertj
[rust.git] / src / test / ui / rfc-2093-infer-outlives / nested-union.rs
1 #![feature(rustc_attrs)]
2 #![feature(untagged_unions)]
3 #![allow(unions_with_drop_fields)]
4
5 #[rustc_outlives]
6 union Foo<'a, T> { //~ ERROR rustc_outlives
7     field1: Bar<'a, T>
8 }
9
10 // Type U needs to outlive lifetime 'b
11 union Bar<'b, U> {
12     field2: &'b U
13 }
14
15 fn main() {}