Simplify one more TraitRef::new site

This commit is contained in:
Oli Scherer 2022-11-21 15:55:37 +00:00
parent 5316378e55
commit a6c5212f13

View File

@ -804,10 +804,9 @@ impl<'f, 'tcx> Coerce<'f, 'tcx> {
self.tcx,
self.cause.clone(),
self.param_env,
ty::Binder::dummy(ty::TraitRef::new(
self.tcx.require_lang_item(hir::LangItem::PointerSized, Some(self.cause.span)),
self.tcx.mk_substs_trait(a, []),
))
ty::Binder::dummy(
self.tcx.at(self.cause.span).mk_trait_ref(hir::LangItem::PointerSized, [a]),
)
.to_poly_trait_predicate(),
));
}