// Test that dyn Foo is invariant with respect to T. // Failure to enforce invariance here can be weaponized, see #71550 for details. trait Foo { type Bar; } fn make() -> Box> { panic!() } fn take<'a>(_: &'a u32) { let _: Box> = make(); //~^ ERROR lifetime may not live long enough } fn main() {}