Guard AliasTy creation against passing the wrong number of substs

This commit is contained in:
Oli Scherer 2022-12-13 10:25:21 +00:00
parent 7bdda8f801
commit fef872a875
9 changed files with 35 additions and 38 deletions

View file

@ -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 {