Remove many more cases of mk_substs_trait that can now use the iterator scheme`

This commit is contained in:
Oli Scherer
2022-12-13 10:44:35 +00:00
parent 0fe86aa977
commit 1bf80249ae
7 changed files with 25 additions and 19 deletions

View File

@@ -2598,7 +2598,11 @@ impl<'tcx> TyCtxt<'tcx> {
}
#[inline]
pub fn mk_projection(self, item_def_id: DefId, substs: SubstsRef<'tcx>) -> Ty<'tcx> {
pub fn mk_projection(
self,
item_def_id: DefId,
substs: impl IntoIterator<Item = impl Into<GenericArg<'tcx>>>,
) -> Ty<'tcx> {
self.mk_ty(Alias(ty::Projection, self.mk_alias_ty(item_def_id, substs)))
}