diff options
| author | Boxy <rust@boxyuwu.dev> | 2025-08-21 16:50:54 +0100 |
|---|---|---|
| committer | lcnr <rust@lcnr.de> | 2025-09-09 14:49:16 +0200 |
| commit | e379c7758667f900aaf5551c4553c7d4c121e3e1 (patch) | |
| tree | c181eeace32e95f479fe817db4261200beb69662 /compiler/rustc_const_eval | |
| parent | fefce3cecd63cebf2d7c9aa3dd90a84379fcfa1a (diff) | |
| download | rust-e379c7758667f900aaf5551c4553c7d4c121e3e1.tar.gz rust-e379c7758667f900aaf5551c4553c7d4c121e3e1.zip | |
erase_regions to erase_and_anonymize_regions
Diffstat (limited to 'compiler/rustc_const_eval')
| -rw-r--r-- | compiler/rustc_const_eval/src/interpret/traits.rs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/compiler/rustc_const_eval/src/interpret/traits.rs b/compiler/rustc_const_eval/src/interpret/traits.rs index e4b5c82853a..870f9a396ae 100644 --- a/compiler/rustc_const_eval/src/interpret/traits.rs +++ b/compiler/rustc_const_eval/src/interpret/traits.rs @@ -23,7 +23,7 @@ impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> { ) -> InterpResult<'tcx, Pointer<Option<M::Provenance>>> { trace!("get_vtable(ty={ty:?}, dyn_ty={dyn_ty:?})"); - let (ty, dyn_ty) = self.tcx.erase_regions((ty, dyn_ty)); + let (ty, dyn_ty) = self.tcx.erase_and_anonymize_regions((ty, dyn_ty)); // All vtables must be monomorphic, bail out otherwise. ensure_monomorphic_enough(*self.tcx, ty)?; @@ -53,8 +53,9 @@ impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> { ) -> &'tcx [VtblEntry<'tcx>] { if let Some(trait_) = trait_ { let trait_ref = trait_.with_self_ty(*self.tcx, dyn_ty); - let trait_ref = - self.tcx.erase_regions(self.tcx.instantiate_bound_regions_with_erased(trait_ref)); + let trait_ref = self.tcx.erase_and_anonymize_regions( + self.tcx.instantiate_bound_regions_with_erased(trait_ref), + ); self.tcx.vtable_entries(trait_ref) } else { TyCtxt::COMMON_VTABLE_ENTRIES |
