mirror of
https://github.com/rust-lang/rust.git
synced 2026-06-01 22:18:23 +03:00
Do not treat vtable supertraits as distinct when bound with different bound vars
This commit is contained in:
+4
-1
@@ -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)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user