1 // Test that Cell is considered invariant with respect to its
4 #![feature(rustc_attrs)]
8 // For better or worse, associated types are invariant, and hence we
9 // get an invariant result for `'a`.
11 struct Foo<'a> { //~ ERROR [o]
12 x: Box<dyn Fn(i32) -> &'a i32 + 'static>