1
Fork 0

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

@ -1258,7 +1258,7 @@ impl<'tcx> LateContext<'tcx> {
tcx.associated_items(trait_id)
.find_by_name_and_kind(tcx, Ident::from_str(name), ty::AssocKind::Type, trait_id)
.and_then(|assoc| {
let proj = tcx.mk_projection(assoc.def_id, tcx.mk_substs_trait(self_ty, []));
let proj = tcx.mk_projection(assoc.def_id, [self_ty]);
tcx.try_normalize_erasing_regions(self.param_env, proj).ok()
})
}