mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-14 17:07:17 +00:00
EarlyBinder::new -> EarlyBinder::bind
This commit is contained in:
parent
53f1e6b7ef
commit
739530a03c
5 changed files with 6 additions and 6 deletions
|
@ -1219,7 +1219,7 @@ fn needless_borrow_impl_arg_position<'tcx>(
|
|||
return false;
|
||||
}
|
||||
|
||||
let predicate = EarlyBinder::new(predicate).subst(cx.tcx, &substs_with_referent_ty);
|
||||
let predicate = EarlyBinder::bind(predicate).subst(cx.tcx, &substs_with_referent_ty);
|
||||
let obligation = Obligation::new(cx.tcx, ObligationCause::dummy(), cx.param_env, predicate);
|
||||
let infcx = cx.tcx.infer_ctxt().build();
|
||||
infcx.predicate_must_hold_modulo_regions(&obligation)
|
||||
|
|
|
@ -243,7 +243,7 @@ fn get_ufcs_type_name<'tcx>(cx: &LateContext<'tcx>, method_def_id: DefId, substs
|
|||
| ty::Ref(..)
|
||||
| ty::Slice(_)
|
||||
| ty::Tuple(_) => {
|
||||
format!("<{}>", EarlyBinder::new(ty).subst(cx.tcx, substs))
|
||||
format!("<{}>", EarlyBinder::bind(ty).subst(cx.tcx, substs))
|
||||
},
|
||||
_ => ty.to_string(),
|
||||
}
|
||||
|
|
|
@ -241,7 +241,7 @@ fn is_contains_sig(cx: &LateContext<'_>, call_id: HirId, iter_expr: &Expr<'_>) -
|
|||
&& let proj_ty = cx.tcx.mk_projection(iter_item.def_id, substs)
|
||||
&& let Ok(item_ty) = cx.tcx.try_normalize_erasing_regions(cx.param_env, proj_ty)
|
||||
{
|
||||
item_ty == EarlyBinder::new(search_ty).subst(cx.tcx, cx.typeck_results().node_substs(call_id))
|
||||
item_ty == EarlyBinder::bind(search_ty).subst(cx.tcx, cx.typeck_results().node_substs(call_id))
|
||||
} else {
|
||||
false
|
||||
}
|
||||
|
|
|
@ -428,7 +428,7 @@ fn can_change_type<'a>(cx: &LateContext<'a>, mut expr: &'a Expr<'a>, mut ty: Ty<
|
|||
}));
|
||||
|
||||
if trait_predicates.any(|predicate| {
|
||||
let predicate = EarlyBinder::new(predicate).subst(cx.tcx, new_subst);
|
||||
let predicate = EarlyBinder::bind(predicate).subst(cx.tcx, new_subst);
|
||||
let obligation = Obligation::new(cx.tcx, ObligationCause::dummy(), cx.param_env, predicate);
|
||||
!cx.tcx.infer_ctxt().build().predicate_must_hold_modulo_regions(&obligation)
|
||||
}) {
|
||||
|
@ -438,7 +438,7 @@ fn can_change_type<'a>(cx: &LateContext<'a>, mut expr: &'a Expr<'a>, mut ty: Ty<
|
|||
let output_ty = fn_sig.output();
|
||||
if output_ty.contains(*param_ty) {
|
||||
if let Ok(new_ty) = cx.tcx.try_subst_and_normalize_erasing_regions(
|
||||
new_subst, cx.param_env, EarlyBinder::new(output_ty)) {
|
||||
new_subst, cx.param_env, EarlyBinder::bind(output_ty)) {
|
||||
expr = parent_expr;
|
||||
ty = new_ty;
|
||||
continue;
|
||||
|
|
|
@ -462,7 +462,7 @@ impl<'a, 'tcx> ConstEvalLateContext<'a, 'tcx> {
|
|||
let substs = if self.substs.is_empty() {
|
||||
substs
|
||||
} else {
|
||||
EarlyBinder::new(substs).subst(self.lcx.tcx, self.substs)
|
||||
EarlyBinder::bind(substs).subst(self.lcx.tcx, self.substs)
|
||||
};
|
||||
|
||||
let result = self
|
||||
|
|
Loading…
Reference in a new issue