Remove some more useless ty::Binder::dummy
calls
This commit is contained in:
parent
d9f842a4dc
commit
071f737a57
3 changed files with 6 additions and 9 deletions
|
@ -764,11 +764,11 @@ impl<'f, 'tcx> Coerce<'f, 'tcx> {
|
||||||
self.tcx,
|
self.tcx,
|
||||||
self.cause.clone(),
|
self.cause.clone(),
|
||||||
self.param_env,
|
self.param_env,
|
||||||
ty::Binder::dummy(ty::TraitRef::from_lang_item(
|
ty::TraitRef::from_lang_item(
|
||||||
self.tcx.at(self.cause.span),
|
self.tcx.at(self.cause.span),
|
||||||
hir::LangItem::PointerLike,
|
hir::LangItem::PointerLike,
|
||||||
[a],
|
[a],
|
||||||
)),
|
),
|
||||||
));
|
));
|
||||||
|
|
||||||
Ok(InferOk {
|
Ok(InferOk {
|
||||||
|
|
|
@ -334,11 +334,11 @@ impl<'tcx> assembly::GoalKind<'tcx> for ProjectionPredicate<'tcx> {
|
||||||
|
|
||||||
ty::Alias(_, _) | ty::Param(_) | ty::Placeholder(..) => {
|
ty::Alias(_, _) | ty::Param(_) | ty::Placeholder(..) => {
|
||||||
// FIXME(ptr_metadata): It would also be possible to return a `Ok(Ambig)` with no constraints.
|
// FIXME(ptr_metadata): It would also be possible to return a `Ok(Ambig)` with no constraints.
|
||||||
let sized_predicate = ty::Binder::dummy(ty::TraitRef::from_lang_item(
|
let sized_predicate = ty::TraitRef::from_lang_item(
|
||||||
tcx.at(DUMMY_SP),
|
tcx.at(DUMMY_SP),
|
||||||
LangItem::Sized,
|
LangItem::Sized,
|
||||||
[ty::GenericArg::from(goal.predicate.self_ty())],
|
[ty::GenericArg::from(goal.predicate.self_ty())],
|
||||||
));
|
);
|
||||||
ecx.add_goal(goal.with(tcx, sized_predicate));
|
ecx.add_goal(goal.with(tcx, sized_predicate));
|
||||||
tcx.types.unit
|
tcx.types.unit
|
||||||
}
|
}
|
||||||
|
|
|
@ -646,11 +646,8 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
|
||||||
output_ty,
|
output_ty,
|
||||||
&mut nested,
|
&mut nested,
|
||||||
);
|
);
|
||||||
let tr = ty::Binder::dummy(ty::TraitRef::from_lang_item(
|
let tr =
|
||||||
self.tcx().at(cause.span),
|
ty::TraitRef::from_lang_item(self.tcx().at(cause.span), LangItem::Sized, [output_ty]);
|
||||||
LangItem::Sized,
|
|
||||||
[output_ty],
|
|
||||||
));
|
|
||||||
nested.push(Obligation::new(self.infcx.tcx, cause, obligation.param_env, tr));
|
nested.push(Obligation::new(self.infcx.tcx, cause, obligation.param_env, tr));
|
||||||
|
|
||||||
Ok(ImplSourceFnPointerData { fn_ty: self_ty, nested })
|
Ok(ImplSourceFnPointerData { fn_ty: self_ty, nested })
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue