Skip to content

Commit c15438a

Browse files
committed
Remove useless parameter.
1 parent c1a89fc commit c15438a

File tree

1 file changed

+9
-14
lines changed
  • compiler/rustc_borrowck/src/region_infer

1 file changed

+9
-14
lines changed

compiler/rustc_borrowck/src/region_infer/mod.rs

+9-14
Original file line numberDiff line numberDiff line change
@@ -642,7 +642,7 @@ impl<'tcx> RegionInferenceContext<'tcx> {
642642
polonius_output: Option<Rc<PoloniusOutput>>,
643643
) -> (Option<ClosureRegionRequirements<'tcx>>, RegionErrors<'tcx>) {
644644
let mir_def_id = body.source.def_id();
645-
self.propagate_constraints(body);
645+
self.propagate_constraints();
646646

647647
let mut errors_buffer = RegionErrors::new(infcx.tcx);
648648

@@ -653,13 +653,7 @@ impl<'tcx> RegionInferenceContext<'tcx> {
653653
// eagerly.
654654
let mut outlives_requirements = infcx.tcx.is_typeck_child(mir_def_id).then(Vec::new);
655655

656-
self.check_type_tests(
657-
infcx,
658-
param_env,
659-
body,
660-
outlives_requirements.as_mut(),
661-
&mut errors_buffer,
662-
);
656+
self.check_type_tests(infcx, param_env, outlives_requirements.as_mut(), &mut errors_buffer);
663657

664658
// In Polonius mode, the errors about missing universal region relations are in the output
665659
// and need to be emitted or propagated. Otherwise, we need to check whether the
@@ -695,8 +689,8 @@ impl<'tcx> RegionInferenceContext<'tcx> {
695689
/// for each region variable until all the constraints are
696690
/// satisfied. Note that some values may grow **too** large to be
697691
/// feasible, but we check this later.
698-
#[instrument(skip(self, _body), level = "debug")]
699-
fn propagate_constraints(&mut self, _body: &Body<'tcx>) {
692+
#[instrument(skip(self), level = "debug")]
693+
fn propagate_constraints(&mut self) {
700694
debug!("constraints={:#?}", {
701695
let mut constraints: Vec<_> = self.constraints.outlives().iter().collect();
702696
constraints.sort_by_key(|c| (c.sup, c.sub));
@@ -908,7 +902,6 @@ impl<'tcx> RegionInferenceContext<'tcx> {
908902
&self,
909903
infcx: &InferCtxt<'tcx>,
910904
param_env: ty::ParamEnv<'tcx>,
911-
body: &Body<'tcx>,
912905
mut propagated_outlives_requirements: Option<&mut Vec<ClosureOutlivesRequirement<'tcx>>>,
913906
errors_buffer: &mut RegionErrors<'tcx>,
914907
) {
@@ -937,7 +930,6 @@ impl<'tcx> RegionInferenceContext<'tcx> {
937930
if self.try_promote_type_test(
938931
infcx,
939932
param_env,
940-
body,
941933
type_test,
942934
propagated_outlives_requirements,
943935
) {
@@ -990,12 +982,15 @@ impl<'tcx> RegionInferenceContext<'tcx> {
990982
/// The idea then is to lower the `T: 'X` constraint into multiple
991983
/// bounds -- e.g., if `'X` is the union of two free lifetimes,
992984
/// `'1` and `'2`, then we would create `T: '1` and `T: '2`.
993-
#[instrument(level = "debug", skip(self, infcx, propagated_outlives_requirements))]
985+
#[instrument(
986+
level = "debug",
987+
skip(self, infcx, param_env, propagated_outlives_requirements),
988+
ret
989+
)]
994990
fn try_promote_type_test(
995991
&self,
996992
infcx: &InferCtxt<'tcx>,
997993
param_env: ty::ParamEnv<'tcx>,
998-
body: &Body<'tcx>,
999994
type_test: &TypeTest<'tcx>,
1000995
propagated_outlives_requirements: &mut Vec<ClosureOutlivesRequirement<'tcx>>,
1001996
) -> bool {

0 commit comments

Comments
 (0)