Guard AliasTy
creation against passing the wrong number of substs
This commit is contained in:
parent
7bdda8f801
commit
fef872a875
9 changed files with 35 additions and 38 deletions
|
@ -1146,7 +1146,7 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
|
|||
|
||||
debug!(?substs_trait_ref_and_assoc_item);
|
||||
|
||||
ty::AliasTy { def_id: assoc_item.def_id, substs: substs_trait_ref_and_assoc_item }
|
||||
self.tcx().mk_alias_ty(assoc_item.def_id, substs_trait_ref_and_assoc_item)
|
||||
});
|
||||
|
||||
if !speculative {
|
||||
|
|
|
@ -1746,10 +1746,7 @@ pub fn check_type_bounds<'tcx>(
|
|||
_ => predicates.push(
|
||||
ty::Binder::bind_with_vars(
|
||||
ty::ProjectionPredicate {
|
||||
projection_ty: ty::AliasTy {
|
||||
def_id: trait_ty.def_id,
|
||||
substs: rebased_substs,
|
||||
},
|
||||
projection_ty: tcx.mk_alias_ty(trait_ty.def_id, rebased_substs),
|
||||
term: impl_ty_value.into(),
|
||||
},
|
||||
bound_vars,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue