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.
This commit is contained in:
Lukas Wirth 2025-08-02 08:46:15 +02:00
parent c23f07d8c5
commit 2f60cef412

View file

@ -357,7 +357,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.