]> git.lizzy.rs Git - rust.git/blob - tests/ui/regions/regions-outlives-nominal-type-struct-type-rev.rs
internally change regions to be covariant
[rust.git] / tests / ui / regions / regions-outlives-nominal-type-struct-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 // check-pass
7
8 #![feature(rustc_attrs)]
9 #![allow(dead_code)]
10
11 mod rev_variant_struct_type {
12     struct Foo<T> {
13         x: fn(T)
14     }
15     struct Bar<'a,'b> {
16         f: &'a Foo<&'b i32>
17     }
18 }
19
20 fn main() { }