@@ -658,7 +658,6 @@ impl<'tcx> RegionInferenceContext<'tcx> {
658658 pub ( super ) fn solve (
659659 & mut self ,
660660 infcx : & InferCtxt < ' tcx > ,
661- param_env : ty:: ParamEnv < ' tcx > ,
662661 body : & Body < ' tcx > ,
663662 polonius_output : Option < Rc < PoloniusOutput > > ,
664663 ) -> ( Option < ClosureRegionRequirements < ' tcx > > , RegionErrors < ' tcx > ) {
@@ -674,7 +673,7 @@ impl<'tcx> RegionInferenceContext<'tcx> {
674673 // eagerly.
675674 let mut outlives_requirements = infcx. tcx . is_typeck_child ( mir_def_id) . then ( Vec :: new) ;
676675
677- self . check_type_tests ( infcx, body , outlives_requirements. as_mut ( ) , & mut errors_buffer) ;
676+ self . check_type_tests ( infcx, outlives_requirements. as_mut ( ) , & mut errors_buffer) ;
678677
679678 debug ! ( ?errors_buffer) ;
680679 debug ! ( ?outlives_requirements) ;
@@ -932,7 +931,6 @@ impl<'tcx> RegionInferenceContext<'tcx> {
932931 fn check_type_tests (
933932 & self ,
934933 infcx : & InferCtxt < ' tcx > ,
935- body : & Body < ' tcx > ,
936934 mut propagated_outlives_requirements : Option < & mut Vec < ClosureOutlivesRequirement < ' tcx > > > ,
937935 errors_buffer : & mut RegionErrors < ' tcx > ,
938936 ) {
@@ -957,12 +955,7 @@ impl<'tcx> RegionInferenceContext<'tcx> {
957955 }
958956
959957 if let Some ( propagated_outlives_requirements) = & mut propagated_outlives_requirements {
960- if self . try_promote_type_test (
961- infcx,
962- body,
963- type_test,
964- propagated_outlives_requirements,
965- ) {
958+ if self . try_promote_type_test ( infcx, type_test, propagated_outlives_requirements) {
966959 continue ;
967960 }
968961 }
@@ -1016,7 +1009,6 @@ impl<'tcx> RegionInferenceContext<'tcx> {
10161009 fn try_promote_type_test (
10171010 & self ,
10181011 infcx : & InferCtxt < ' tcx > ,
1019- body : & Body < ' tcx > ,
10201012 type_test : & TypeTest < ' tcx > ,
10211013 propagated_outlives_requirements : & mut Vec < ClosureOutlivesRequirement < ' tcx > > ,
10221014 ) -> bool {
@@ -1179,35 +1171,6 @@ impl<'tcx> RegionInferenceContext<'tcx> {
11791171 Some ( ClosureOutlivesSubject :: Ty ( ClosureOutlivesSubjectTy :: bind ( tcx, ty) ) )
11801172 }
11811173
1182- /// Returns a universally quantified region that outlives the
1183- /// value of `r` (`r` may be existentially or universally
1184- /// quantified).
1185- ///
1186- /// Since `r` is (potentially) an existential region, it has some
1187- /// value which may include (a) any number of points in the CFG
1188- /// and (b) any number of `end('x)` elements of universally
1189- /// quantified regions. To convert this into a single universal
1190- /// region we do as follows:
1191- ///
1192- /// - Ignore the CFG points in `'r`. All universally quantified regions
1193- /// include the CFG anyhow.
1194- /// - For each `end('x)` element in `'r`, compute the mutual LUB, yielding
1195- /// a result `'y`.
1196- #[ instrument( skip( self ) , level = "debug" , ret) ]
1197- pub ( crate ) fn universal_upper_bound ( & self , r : RegionVid ) -> RegionVid {
1198- debug ! ( r = %self . region_value_str( r) ) ;
1199-
1200- // Find the smallest universal region that contains all other
1201- // universal regions within `region`.
1202- let mut lub = self . universal_regions . fr_fn_body ;
1203- let r_scc = self . constraint_sccs . scc ( r) ;
1204- for ur in self . scc_values . universal_regions_outlived_by ( r_scc) {
1205- lub = self . universal_region_relations . postdom_upper_bound ( lub, ur) ;
1206- }
1207-
1208- lub
1209- }
1210-
12111174 /// Like `universal_upper_bound`, but returns an approximation more suitable
12121175 /// for diagnostics. If `r` contains multiple disjoint universal regions
12131176 /// (e.g. 'a and 'b in `fn foo<'a, 'b> { ... }`, we pick the lower-numbered region.
0 commit comments