Change:
<!-- Thank you for finding an Internal Compiler Error! If possible, try to provide a minimal verifiable example. You can read "Rust Bug Minimization Patterns" for how to create smaller examples. --minimal project with full compiler output can be found here cargo 1.77.0-nightly ( 2024-01-09) : <!-- Include a backtrace in the code block by setting in your environment. E.g. . --<details<summary<strongBacktrace</strong</summary<p</p</details

Discussion:
let result_subst = CanonicalVarValues { var_values: self.tcx.mk_args_from_iter( query_response.variables.iter().enumerate().map(|(index, info)| { <del> if info.is_existential() { </del> <ins> if info.universe() != ty::UniverseIndex::ROOT { // A variable from inside a binder of the query. While ideally these shouldn't // exist at all, we have to deal with them for now. self.instantiate_canonical_var(cause.span, info, |u| { universe_map[u.as_usize()] }) } else if info.is_existential() { </ins> match opt_values[BoundVar::new(index)] { Some(k) => k, None => self.instantiate_canonical_var(cause.span, info, |u| {

}), } } else { <del> self.instantiate_canonical_var(cause.span, info, |u| { universe_map[u.as_usize()] }) </del> <ins> // For placeholders which were already part of the input, we simply map this // universal bound variable back the placeholder of the input. opt_values[BoundVar::new(index)].expect( "expected placeholder to be unified with itself during response", ) </ins> } }), ),

<ins> warning: the feature `non_lifetime_binders` is incomplete and may not be safe to use and/or cause compiler crashes --> $DIR/unifying-placeholders-in-query-response-2.rs:5:12 | LL | #![feature(non_lifetime_binders)] |            ^^^^^^^^^^^^^^^^^^^^ | = note: see issue #108185 <https://github.com/rust-lang/rust/issues/108185> for more information = note: `#[warn(incomplete_features)]` on by default warning: 1 warning emitted </ins>

<ins> // revisions: current next //[next] compile-flags: -Znext-solver // check-pass #![feature(non_lifetime_binders)] //~^ WARN the feature `non_lifetime_binders` is incomplete trait Id { type Output: ?Sized; } impl<T: ?Sized> Id for T { type Output = T; } trait Everyone {} impl<T: ?Sized> Everyone for T {} fn hello() where for<T> <T as Id>::Output: Everyone {} fn main() { hello(); } </ins>

<ins> warning: the feature `non_lifetime_binders` is incomplete and may not be safe to use and/or cause compiler crashes --> $DIR/unifying-placeholders-in-query-response.rs:5:12 | LL | #![feature(non_lifetime_binders)] |            ^^^^^^^^^^^^^^^^^^^^ | = note: see issue #108185 <https://github.com/rust-lang/rust/issues/108185> for more information = note: `#[warn(incomplete_features)]` on by default warning: 1 warning emitted </ins>

<ins> // revisions: current next //[next] compile-flags: -Znext-solver // check-pass #![feature(non_lifetime_binders)] //~^ WARN the feature `non_lifetime_binders` is incomplete pub trait Foo<T: ?Sized> { type Bar<K: ?Sized>: ?Sized; } impl Foo<usize> for () { type Bar<K: ?Sized> = K; } pub fn f<T1, T2>(a: T1, b: T2) where T1: for<T> Foo<usize, Bar<T> = T>, T2: for<T> Foo<usize, Bar<T> = <T1 as Foo<usize>>::Bar<T>>, { } fn it_works() { f((), ()); } fn main() {} </ins>