//@ compile-flags: -Znext-solver //@ ignore-compare-mode-next-solver (explicit revisions) //@ check-pass #![allow(unconditional_recursion)] // Test for trait-system-refactor-initiative#182 making sure // that we don't incorrectly normalize to rigid aliases if the // opaque type only has a trait bound. trait Id { type This; } impl Id for Vec { type This = Vec; } fn to_assoc(x: T) -> ::This { todo!() } fn mirror(x: Vec) -> impl Id { let x = to_assoc(mirror(x)); // `?x` equals ` as Id>::This`. We should not infer `?x` // to be a rigid alias here. let _: Vec = x; x } fn main() {}