diff options
| author | Lukas Wirth <me@lukaswirth.dev> | 2025-08-02 08:46:15 +0200 |
|---|---|---|
| committer | Lukas Wirth <me@lukaswirth.dev> | 2025-08-02 08:48:31 +0200 |
| commit | 2f60cef412ab56b17c62f2ea44ce72094be8d947 (patch) | |
| tree | 97f5ff67cac75582afc89ba5d526ef0c54e5b5ee /compiler | |
| parent | c23f07d8c56c51b5e634bda55daca2b073306340 (diff) | |
| download | rust-2f60cef412ab56b17c62f2ea44ce72094be8d947.tar.gz rust-2f60cef412ab56b17c62f2ea44ce72094be8d947.zip | |
`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.
Diffstat (limited to 'compiler')
| -rw-r--r-- | compiler/rustc_type_ir/src/binder.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_type_ir/src/binder.rs b/compiler/rustc_type_ir/src/binder.rs index a7b915c4845..202d81df5ae 100644 --- a/compiler/rustc_type_ir/src/binder.rs +++ b/compiler/rustc_type_ir/src/binder.rs @@ -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. |
