Skip to content

Commit a6c5212

Browse files
committed
Simplify one more TraitRef::new site
1 parent 5316378 commit a6c5212

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

compiler/rustc_hir_typeck/src/coercion.rs

+3-4
Original file line numberDiff line numberDiff line change
@@ -804,10 +804,9 @@ impl<'f, 'tcx> Coerce<'f, 'tcx> {
804804
self.tcx,
805805
self.cause.clone(),
806806
self.param_env,
807-
ty::Binder::dummy(ty::TraitRef::new(
808-
self.tcx.require_lang_item(hir::LangItem::PointerSized, Some(self.cause.span)),
809-
self.tcx.mk_substs_trait(a, []),
810-
))
807+
ty::Binder::dummy(
808+
self.tcx.at(self.cause.span).mk_trait_ref(hir::LangItem::PointerSized, [a]),
809+
)
811810
.to_poly_trait_predicate(),
812811
));
813812
}

0 commit comments

Comments
 (0)