1
Fork 0

Do not treat vtable supertraits as distinct when bound with different bound vars

This commit is contained in:
Michael Goulet 2025-01-10 04:36:11 +00:00
parent 37a430e6ea
commit fdc4bd22b7
18 changed files with 146 additions and 115 deletions

View file

@ -746,7 +746,9 @@ impl<'tcx> Context for TablesWrapper<'tcx> {
let tcx = tables.tcx;
let alloc_id = tables.tcx.vtable_allocation((
ty.internal(&mut *tables, tcx),
trait_ref.internal(&mut *tables, tcx),
trait_ref
.internal(&mut *tables, tcx)
.map(|principal| tcx.instantiate_bound_regions_with_erased(principal)),
));
Some(alloc_id.stable(&mut *tables))
}