blob: 12af7ae8c5b8a36e29445b4cea37e080ad3ae435 [file] [log] [blame]
// Test that Cell is considered invariant with respect to its
// type.
#![feature(rustc_attrs)]
use std::cell::Cell;
// For better or worse, associated types are invariant, and hence we
// get an invariant result for `'a`.
#[rustc_variance]
struct Foo<'a> { //~ ERROR [o]
x: Box<Fn(i32) -> &'a i32 + 'static>
}
fn main() {
}