diff options
| author | bors <bors@rust-lang.org> | 2021-10-08 09:04:06 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2021-10-08 09:04:06 +0000 |
| commit | 44995f7afb18775913618ae50601be31b9f9dead (patch) | |
| tree | 77ac1030bbb38e9c80d35297293ca06b10e166fc /compiler/rustc_query_impl | |
| parent | 3013b26947e956352f95edfa39251319520cb06c (diff) | |
| parent | b7cc99142ad0cfe47e2fe9f7a82eaf5b672c0573 (diff) | |
| download | rust-44995f7afb18775913618ae50601be31b9f9dead.tar.gz rust-44995f7afb18775913618ae50601be31b9f9dead.zip | |
Auto merge of #89619 - michaelwoerister:incr-vtables, r=nagisa
Turn vtable_allocation() into a query This PR removes the untracked vtable-const-allocation cache from the `tcx` and turns the `vtable_allocation()` method into a query. The change is pretty straightforward and should be backportable without too much effort. Fixes https://github.com/rust-lang/rust/issues/89598.
Diffstat (limited to 'compiler/rustc_query_impl')
| -rw-r--r-- | compiler/rustc_query_impl/src/keys.rs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/compiler/rustc_query_impl/src/keys.rs b/compiler/rustc_query_impl/src/keys.rs index 563a3cf1438..34489287596 100644 --- a/compiler/rustc_query_impl/src/keys.rs +++ b/compiler/rustc_query_impl/src/keys.rs @@ -72,6 +72,17 @@ impl<'tcx> Key for mir::interpret::GlobalId<'tcx> { } } +impl<'tcx> Key for (Ty<'tcx>, Option<ty::PolyExistentialTraitRef<'tcx>>) { + #[inline(always)] + fn query_crate_is_local(&self) -> bool { + true + } + + fn default_span(&self, _: TyCtxt<'_>) -> Span { + DUMMY_SP + } +} + impl<'tcx> Key for mir::interpret::LitToConstInput<'tcx> { #[inline(always)] fn query_crate_is_local(&self) -> bool { |
