// check-pass // compile-flags: -Ztrait-solver=next pub trait A {} pub trait B: A {} pub trait Mirror { type Assoc: ?Sized; } impl Mirror for T { type Assoc = T; } pub fn foo<'a>(x: &'a ::Assoc) -> &'a (dyn A + 'static) { x } fn main() {}