// compile-flags: -Znext-solver // check-pass trait Trait<'a> { type Item: for<'b> Trait2<'b>; } trait Trait2<'a> {} impl Trait2<'_> for () {} fn needs_trait(_: Box Trait<'a> + ?Sized>) {} fn foo(x: Box Trait<'a, Item = ()>>) { needs_trait(x); } fn main() {}