summaryrefslogtreecommitdiffstats
path: root/src/test/ui/regions/regions-outlives-nominal-type-struct-region-rev.rs
blob: 45155c7216603846716cd9d59e482c91c6589441 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// Test that a nominal type (like `Foo<'a>`) outlives `'b` if its
// arguments (like `'a`) outlive `'b`.
//
// Rule OutlivesNominalType from RFC 1214.

// check-pass

#![feature(rustc_attrs)]
#![allow(dead_code)]

mod rev_variant_struct_region {
    struct Foo<'a> {
        x: fn(&'a i32),
    }
    struct Bar<'a,'b> {
        f: &'a Foo<'b>
    }
}

fn main() { }