]> git.lizzy.rs Git - rust.git/blob - src/test/ui/regions/regions-outlives-nominal-type-struct-region-rev.rs
Rollup merge of #57107 - mjbshaw:thread_local_test, r=nikomatsakis
[rust.git] / src / test / ui / regions / regions-outlives-nominal-type-struct-region-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 rev_variant_struct_region {
12     struct Foo<'a> {
13         x: fn(&'a i32),
14     }
15     struct Bar<'a,'b> {
16         f: &'a Foo<'b>
17     }
18 }
19
20 fn main() { }