diff options
| author | Michael Goulet <michael@errs.io> | 2025-01-10 04:36:11 +0000 |
|---|---|---|
| committer | Michael Goulet <michael@errs.io> | 2025-01-30 15:33:58 +0000 |
| commit | fdc4bd22b7b8117f4a3864c342773df600f5b956 (patch) | |
| tree | 404a8293a3401144634e980e436c1b7ca1faac18 /compiler/rustc_codegen_gcc | |
| parent | 37a430e6ea0a674287b53a017497b3414e44b93d (diff) | |
| download | rust-fdc4bd22b7b8117f4a3864c342773df600f5b956.tar.gz rust-fdc4bd22b7b8117f4a3864c342773df600f5b956.zip | |
Do not treat vtable supertraits as distinct when bound with different bound vars
Diffstat (limited to 'compiler/rustc_codegen_gcc')
| -rw-r--r-- | compiler/rustc_codegen_gcc/src/common.rs | 7 |
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) |
