Skip to content

Commit a9251b6

Browse files
committed
Auto merge of rust-lang#112102 - Nilstrieb:rollup-ivu1hmc, r=Nilstrieb
Rollup of 7 pull requests Successful merges: - rust-lang#107916 (fix comment on Allocator trait) - rust-lang#111543 (Uplift `clippy::invalid_utf8_in_unchecked` lint) - rust-lang#111872 (fix: dedup `static_candidates` before report) - rust-lang#111955 (bootstrap: Various Step refactors) - rust-lang#112060 (`EarlyBinder::new` -> `EarlyBinder::bind`) - rust-lang#112064 (Migrate GUI colors test to original CSS color format) - rust-lang#112100 (Don't typecheck recovered method call from suggestion) r? `@ghost` `@rustbot` modify labels: rollup
2 parents 3266c36 + cc12182 commit a9251b6

File tree

82 files changed

+796
-434
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

82 files changed

+796
-434
lines changed

compiler/rustc_codegen_cranelift/src/common.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,7 @@ impl<'tcx> FunctionCx<'_, '_, 'tcx> {
361361
self.instance.subst_mir_and_normalize_erasing_regions(
362362
self.tcx,
363363
ty::ParamEnv::reveal_all(),
364-
ty::EarlyBinder::new(value),
364+
ty::EarlyBinder::bind(value),
365365
)
366366
}
367367

compiler/rustc_codegen_llvm/src/debuginfo/create_scope_map.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ fn make_mir_scope<'ll, 'tcx>(
9393
let callee = cx.tcx.subst_and_normalize_erasing_regions(
9494
instance.substs,
9595
ty::ParamEnv::reveal_all(),
96-
ty::EarlyBinder::new(callee),
96+
ty::EarlyBinder::bind(callee),
9797
);
9898
let callee_fn_abi = cx.fn_abi_of_instance(callee, ty::List::empty());
9999
cx.dbg_scope_fn(callee, callee_fn_abi, None)

compiler/rustc_codegen_ssa/src/mir/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
111111
self.instance.subst_mir_and_normalize_erasing_regions(
112112
self.cx.tcx(),
113113
ty::ParamEnv::reveal_all(),
114-
ty::EarlyBinder::new(value),
114+
ty::EarlyBinder::bind(value),
115115
)
116116
}
117117
}

compiler/rustc_const_eval/src/interpret/eval_context.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -497,7 +497,7 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
497497
.try_subst_mir_and_normalize_erasing_regions(
498498
*self.tcx,
499499
self.param_env,
500-
ty::EarlyBinder::new(value),
500+
ty::EarlyBinder::bind(value),
501501
)
502502
.map_err(|_| err_inval!(TooGeneric))
503503
}

compiler/rustc_hir_analysis/src/astconv/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1280,7 +1280,7 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
12801280
// params (and trait ref's late bound params). This logic is very similar to
12811281
// `Predicate::subst_supertrait`, and it's no coincidence why.
12821282
let shifted_output = tcx.shift_bound_var_indices(num_bound_vars, output);
1283-
let subst_output = ty::EarlyBinder::new(shifted_output).subst(tcx, substs);
1283+
let subst_output = ty::EarlyBinder::bind(shifted_output).subst(tcx, substs);
12841284

12851285
let bound_vars = tcx.late_bound_vars(binding.hir_id);
12861286
ty::Binder::bind_with_vars(subst_output, bound_vars)

compiler/rustc_hir_analysis/src/check/compare_impl_item.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -796,14 +796,14 @@ pub(super) fn collect_return_position_impl_trait_in_trait_tys<'tcx>(
796796
})
797797
});
798798
debug!(%ty);
799-
collected_tys.insert(def_id, ty::EarlyBinder::new(ty));
799+
collected_tys.insert(def_id, ty::EarlyBinder::bind(ty));
800800
}
801801
Err(err) => {
802802
let reported = tcx.sess.delay_span_bug(
803803
return_span,
804804
format!("could not fully resolve: {ty} => {err:?}"),
805805
);
806-
collected_tys.insert(def_id, ty::EarlyBinder::new(tcx.ty_error(reported)));
806+
collected_tys.insert(def_id, ty::EarlyBinder::bind(tcx.ty_error(reported)));
807807
}
808808
}
809809
}

compiler/rustc_hir_analysis/src/check/dropck.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ fn ensure_drop_predicates_are_implied_by_item_defn<'tcx>(
128128
// We don't need to normalize this param-env or anything, since we're only
129129
// substituting it with free params, so no additional param-env normalization
130130
// can occur on top of what has been done in the param_env query itself.
131-
let param_env = ty::EarlyBinder::new(tcx.param_env(adt_def_id))
131+
let param_env = ty::EarlyBinder::bind(tcx.param_env(adt_def_id))
132132
.subst(tcx, adt_to_impl_substs)
133133
.with_constness(tcx.constness(drop_impl_def_id));
134134

compiler/rustc_hir_analysis/src/check/wfcheck.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1407,7 +1407,7 @@ fn check_where_clauses<'tcx>(wfcx: &WfCheckingCtxt<'_, 'tcx>, span: Span, def_id
14071407
}
14081408
let mut param_count = CountParams::default();
14091409
let has_region = pred.visit_with(&mut param_count).is_break();
1410-
let substituted_pred = ty::EarlyBinder::new(pred).subst(tcx, substs);
1410+
let substituted_pred = ty::EarlyBinder::bind(pred).subst(tcx, substs);
14111411
// Don't check non-defaulted params, dependent defaults (including lifetimes)
14121412
// or preds with multiple params.
14131413
if substituted_pred.has_non_region_param() || param_count.params.len() > 1 || has_region

compiler/rustc_hir_analysis/src/collect.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1124,7 +1124,7 @@ fn fn_sig(tcx: TyCtxt<'_>, def_id: LocalDefId) -> ty::EarlyBinder<ty::PolyFnSig<
11241124
bug!("unexpected sort of node in fn_sig(): {:?}", x);
11251125
}
11261126
};
1127-
ty::EarlyBinder::new(output)
1127+
ty::EarlyBinder::bind(output)
11281128
}
11291129

11301130
fn infer_return_ty_for_fn_sig<'tcx>(
@@ -1312,7 +1312,7 @@ fn impl_trait_ref(
13121312
check_impl_constness(tcx, impl_.constness, ast_trait_ref),
13131313
)
13141314
})
1315-
.map(ty::EarlyBinder::new)
1315+
.map(ty::EarlyBinder::bind)
13161316
}
13171317

13181318
fn check_impl_constness(

compiler/rustc_hir_analysis/src/collect/item_bounds.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ pub(super) fn explicit_item_bounds(
8686
Some(ty::ImplTraitInTraitData::Trait { opaque_def_id, .. }) => {
8787
let item = tcx.hir().get_by_def_id(opaque_def_id.expect_local()).expect_item();
8888
let opaque_ty = item.expect_opaque_ty();
89-
return ty::EarlyBinder::new(opaque_type_bounds(
89+
return ty::EarlyBinder::bind(opaque_type_bounds(
9090
tcx,
9191
opaque_def_id.expect_local(),
9292
opaque_ty.bounds,
@@ -124,7 +124,7 @@ pub(super) fn explicit_item_bounds(
124124
}
125125
_ => bug!("item_bounds called on {:?}", def_id),
126126
};
127-
ty::EarlyBinder::new(bounds)
127+
ty::EarlyBinder::bind(bounds)
128128
}
129129

130130
pub(super) fn item_bounds(

0 commit comments

Comments
 (0)