]> git.lizzy.rs Git - rust.git/blob - src/test/ui/regions/regions-outlives-nominal-type-enum-type-rev.rs
Rollup merge of #57107 - mjbshaw:thread_local_test, r=nikomatsakis
[rust.git] / src / test / ui / regions / regions-outlives-nominal-type-enum-type-rev.rs
1 // Test that a nominal type (like `Foo<'a>`) outlives `'b` if its
2 // arguments (like `'a`) outlive `'b`.
3 //
4 // Rule OutlivesNominalType from RFC 1214.
5
6 //compile-pass
7
8 #![feature(rustc_attrs)]
9 #![allow(dead_code)]
10
11 mod variant_struct_type {
12     struct Foo<T> {
13         x: fn(T)
14     }
15     enum Bar<'a,'b> {
16         V(&'a Foo<&'b i32>)
17     }
18 }
19
20 fn main() { }