@@ -973,23 +973,20 @@ impl<'tcx> RegionInferenceContext<'tcx> {
973
973
propagated_outlives_requirements : & mut Vec < ClosureOutlivesRequirement < ' tcx > > ,
974
974
) -> bool {
975
975
let tcx = infcx. tcx ;
976
-
977
- let TypeTest { generic_kind, lower_bound, span : _, verify_bound : _ } = type_test;
976
+ let TypeTest { generic_kind, lower_bound, span : blame_span, ref verify_bound } = * type_test;
978
977
979
978
let generic_ty = generic_kind. to_ty ( tcx) ;
980
979
let Some ( subject) = self . try_promote_type_test_subject ( infcx, generic_ty) else {
981
980
return false ;
982
981
} ;
983
982
984
- let r_scc = self . constraint_sccs . scc ( * lower_bound) ;
985
-
983
+ let r_scc = self . constraint_sccs . scc ( lower_bound) ;
986
984
debug ! (
987
985
"lower_bound = {:?} r_scc={:?} universe={:?}" ,
988
986
lower_bound,
989
987
r_scc,
990
988
self . constraint_sccs. annotation( r_scc) . min_universe( )
991
989
) ;
992
-
993
990
// If the type test requires that `T: 'a` where `'a` is a
994
991
// placeholder from another universe, that effectively requires
995
992
// `T: 'static`, so we have to propagate that requirement.
@@ -1002,7 +999,7 @@ impl<'tcx> RegionInferenceContext<'tcx> {
1002
999
propagated_outlives_requirements. push ( ClosureOutlivesRequirement {
1003
1000
subject,
1004
1001
outlived_free_region : static_r,
1005
- blame_span : type_test . span ,
1002
+ blame_span,
1006
1003
category : ConstraintCategory :: Boring ,
1007
1004
} ) ;
1008
1005
@@ -1029,12 +1026,12 @@ impl<'tcx> RegionInferenceContext<'tcx> {
1029
1026
// where `ur` is a local bound -- we are sometimes in a
1030
1027
// position to prove things that our caller cannot. See
1031
1028
// #53570 for an example.
1032
- if self . eval_verify_bound ( infcx, generic_ty, ur, & type_test . verify_bound ) {
1029
+ if self . eval_verify_bound ( infcx, generic_ty, ur, & verify_bound) {
1033
1030
continue ;
1034
1031
}
1035
1032
1036
1033
let non_local_ub = self . universal_region_relations . non_local_upper_bounds ( ur) ;
1037
- debug ! ( "try_promote_type_test: non_local_ub={:?}" , non_local_ub) ;
1034
+ debug ! ( ? non_local_ub) ;
1038
1035
1039
1036
// This is slightly too conservative. To show T: '1, given `'2: '1`
1040
1037
// and `'3: '1` we only need to prove that T: '2 *or* T: '3, but to
@@ -1047,10 +1044,10 @@ impl<'tcx> RegionInferenceContext<'tcx> {
1047
1044
let requirement = ClosureOutlivesRequirement {
1048
1045
subject,
1049
1046
outlived_free_region : upper_bound,
1050
- blame_span : type_test . span ,
1047
+ blame_span,
1051
1048
category : ConstraintCategory :: Boring ,
1052
1049
} ;
1053
- debug ! ( "try_promote_type_test: pushing {:#?}" , requirement) ;
1050
+ debug ! ( ?requirement , "adding closure requirement" ) ;
1054
1051
propagated_outlives_requirements. push ( requirement) ;
1055
1052
}
1056
1053
}
0 commit comments