]> git.proxmox.com Git - rustc.git/blob - src/test/ui/regions/regions-outlives-nominal-type-struct-region.rs
New upstream version 1.40.0+dfsg1
[rustc.git] / src / test / ui / regions / regions-outlives-nominal-type-struct-region.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 // build-pass (FIXME(62277): could be check-pass?)
7
8 #![feature(rustc_attrs)]
9 #![allow(dead_code)]
10
11 mod variant_struct_region {
12 struct Foo<'a> {
13 x: &'a i32,
14 }
15 struct Bar<'a,'b> {
16 f: &'a Foo<'b>
17 }
18 }
19
20 fn main() { }