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