Rollup merge of #144808 - Veykril:push-uttkuyswqnzt, r=compiler-errors

`Interner` arg to `EarlyBinder` does not affect auto traits

Conceptually `EarlyBinder` does not contain an `Interner` so it shouldn't tell Rust it does via `PhantomData`. This is necessary for rust-analyzer as it stores `EarlyBinder`s in query results which require `Sync`, placing restrictions on our interner setup.

r? compiler-errors
This commit is contained in:
Samuel Tardieu
2025-08-03 21:56:58 +02:00
committed by GitHub

View File

@@ -376,7 +376,7 @@ impl<I: Interner> TypeVisitor<I> for ValidateBoundVars<I> {
pub struct EarlyBinder<I: Interner, T> {
value: T,
#[derive_where(skip(Debug))]
_tcx: PhantomData<I>,
_tcx: PhantomData<fn() -> I>,
}
/// For early binders, you should first call `instantiate` before using any visitors.