about summary refs log tree commit diff
path: root/compiler/rustc_codegen_gcc/src/common.rs
diff options
context:
space:
mode:
authorThe rustc-dev-guide Cronjob Bot <github-actions@github.com>2025-02-02 04:02:22 +0000
committerThe rustc-dev-guide Cronjob Bot <github-actions@github.com>2025-02-02 04:02:22 +0000
commit95665307cd848ec43f1604d8e0bd4e274d991809 (patch)
treeee8904db2a42ffe3ab1253f2d904a3f48e81b6e1 /compiler/rustc_codegen_gcc/src/common.rs
parentf09de673565b88dd0c9f416e171f5c099073270e (diff)
parent4f5116e236843492998acfa42381d14db360f2ab (diff)
downloadrust-95665307cd848ec43f1604d8e0bd4e274d991809.tar.gz
rust-95665307cd848ec43f1604d8e0bd4e274d991809.zip
Merge from rustc
Diffstat (limited to 'compiler/rustc_codegen_gcc/src/common.rs')
-rw-r--r--compiler/rustc_codegen_gcc/src/common.rs7
1 files changed, 6 insertions, 1 deletions
diff --git a/compiler/rustc_codegen_gcc/src/common.rs b/compiler/rustc_codegen_gcc/src/common.rs
index bd5d6ba387c..20a3482aaa2 100644
--- a/compiler/rustc_codegen_gcc/src/common.rs
+++ b/compiler/rustc_codegen_gcc/src/common.rs
@@ -234,7 +234,12 @@ impl<'gcc, 'tcx> ConstCodegenMethods<'tcx> for CodegenCx<'gcc, 'tcx> {
                     GlobalAlloc::VTable(ty, dyn_ty) => {
                         let alloc = self
                             .tcx
-                            .global_alloc(self.tcx.vtable_allocation((ty, dyn_ty.principal())))
+                            .global_alloc(self.tcx.vtable_allocation((
+                                ty,
+                                dyn_ty.principal().map(|principal| {
+                                    self.tcx.instantiate_bound_regions_with_erased(principal)
+                                }),
+                            )))
                             .unwrap_memory();
                         let init = const_alloc_to_gcc(self, alloc);
                         self.static_addr_of(init, alloc.inner().align, None)