Skip to content

Commit 2f60cef

Browse files
committed
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.
1 parent c23f07d commit 2f60cef

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler/rustc_type_ir/src/binder.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -357,7 +357,7 @@ impl<I: Interner> TypeVisitor<I> for ValidateBoundVars<I> {
357357
pub struct EarlyBinder<I: Interner, T> {
358358
value: T,
359359
#[derive_where(skip(Debug))]
360-
_tcx: PhantomData<I>,
360+
_tcx: PhantomData<fn() -> I>,
361361
}
362362

363363
/// For early binders, you should first call `instantiate` before using any visitors.

0 commit comments

Comments
 (0)