about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2021-10-08 09:04:06 +0000
committerbors <bors@rust-lang.org>2021-10-08 09:04:06 +0000
commit2228c49544c055d6a8e86346d2d6932dbfb2a898 (patch)
treed3de2cb4310adb77d265d651d74fc1eb40da63db
parent03c02be0a7778d103c205acebcd4f8035736286b (diff)
parent095064b9960f85bdf371f7448b3b93d28ba6168f (diff)
downloadrust-2228c49544c055d6a8e86346d2d6932dbfb2a898.tar.gz
rust-2228c49544c055d6a8e86346d2d6932dbfb2a898.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.
-rw-r--r--src/vtable.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/vtable.rs b/src/vtable.rs
index f97d416b66f..36b3725ef42 100644
--- a/src/vtable.rs
+++ b/src/vtable.rs
@@ -68,7 +68,7 @@ pub(crate) fn get_vtable<'tcx>(
     ty: Ty<'tcx>,
     trait_ref: Option<ty::PolyExistentialTraitRef<'tcx>>,
 ) -> Value {
-    let alloc_id = fx.tcx.vtable_allocation(ty, trait_ref);
+    let alloc_id = fx.tcx.vtable_allocation((ty, trait_ref));
     let data_id =
         data_id_for_alloc_id(&mut fx.constants_cx, &mut *fx.module, alloc_id, Mutability::Not);
     let local_data_id = fx.module.declare_data_in_func(data_id, &mut fx.bcx.func);