blob: f3e4e39ac23e460cfaaa87ce4f514ea1e9f6cef6 [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.
#![allow(dead_code)]
mod variant_struct_type {
struct Foo<T> {
x: T
}
trait Trait<'a, 'b> {
type Out;
}
impl<'a, 'b> Trait<'a, 'b> for usize {
type Out = &'a Foo<&'b i32>; //~ ERROR reference has a longer lifetime
}
}
fn main() { }