blob: 096069c0ca4af5752a6fd58d2629961f30c8eca5 [file] [log] [blame]
// Test that a nominal type (like `Foo<'a>`) outlives `'b` if its
// arguments (like `'a`) outlive `'b`.
//
// Rule OutlivesNominalType from RFC 1214.
// compile-pass
#![feature(rustc_attrs)]
#![allow(dead_code)]
mod rev_variant_struct_type {
struct Foo<T> {
x: fn(T)
}
struct Bar<'a,'b> {
f: &'a Foo<&'b i32> //~ ERROR reference has a longer lifetime
}
}
fn main() { }