The following code: ```rust trait Trait {} impl Trait for () {} fn foo<T: Trait, U: Trait>() -> impl Trait { let a: T = foo::<T, U>(); loop {} let _: T = foo::<U, T>(); } ``` used to incorrectly compile but now correctly errors, we should add a test to ensure this doesn't regress. cc #111853 @compiler-errors <!-- TRIAGEBOT_START --> <!-- TRIAGEBOT_ASSIGN_START --> <!-- TRIAGEBOT_ASSIGN_DATA_START$${"user":"obeis"}$$TRIAGEBOT_ASSIGN_DATA_END --> <!-- TRIAGEBOT_ASSIGN_END --> <!-- TRIAGEBOT_END -->