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 | 2228c49544c055d6a8e86346d2d6932dbfb2a898 (patch) | |
| tree | d3de2cb4310adb77d265d651d74fc1eb40da63db | |
| parent | 03c02be0a7778d103c205acebcd4f8035736286b (diff) | |
| parent | 095064b9960f85bdf371f7448b3b93d28ba6168f (diff) | |
| download | rust-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.rs | 2 |
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); |
