Do not treat vtable supertraits as distinct when bound with different bound vars
This commit is contained in:
parent
7b19e13d32
commit
9f44caa857
1 changed files with 4 additions and 1 deletions
|
|
@ -245,7 +245,10 @@ pub(crate) fn data_id_for_vtable<'tcx>(
|
|||
ty: Ty<'tcx>,
|
||||
trait_ref: Option<Binder<'tcx, ExistentialTraitRef<'tcx>>>,
|
||||
) -> DataId {
|
||||
let alloc_id = tcx.vtable_allocation((ty, trait_ref));
|
||||
let alloc_id = tcx.vtable_allocation((
|
||||
ty,
|
||||
trait_ref.map(|principal| tcx.instantiate_bound_regions_with_erased(principal)),
|
||||
));
|
||||
data_id_for_alloc_id(cx, module, alloc_id, Mutability::Not)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue