@@ -214,8 +214,8 @@ pub struct TypeTest<'tcx> {
214214 /// The region `'x` that the type must outlive.
215215 pub lower_bound : RegionVid ,
216216
217- /// Where did this constraint arise and why?
218- pub locations : Locations ,
217+ /// The span to blame.
218+ pub span : Span ,
219219
220220 /// A test which, if met by the region `'x`, proves that this type
221221 /// constraint is satisfied.
@@ -870,13 +870,13 @@ impl<'tcx> RegionInferenceContext<'tcx> {
870870 if deduplicate_errors. insert ( (
871871 erased_generic_kind,
872872 type_test. lower_bound ,
873- type_test. locations ,
873+ type_test. span ,
874874 ) ) {
875875 debug ! (
876876 "check_type_test: reporting error for erased_generic_kind={:?}, \
877877 lower_bound_region={:?}, \
878- type_test.locations ={:?}",
879- erased_generic_kind, type_test. lower_bound, type_test. locations ,
878+ type_test.span ={:?}",
879+ erased_generic_kind, type_test. lower_bound, type_test. span ,
880880 ) ;
881881
882882 errors_buffer. push ( RegionErrorKind :: TypeTestError { type_test : type_test. clone ( ) } ) ;
@@ -919,7 +919,7 @@ impl<'tcx> RegionInferenceContext<'tcx> {
919919 ) -> bool {
920920 let tcx = infcx. tcx ;
921921
922- let TypeTest { generic_kind, lower_bound, locations , verify_bound : _ } = type_test;
922+ let TypeTest { generic_kind, lower_bound, span : _ , verify_bound : _ } = type_test;
923923
924924 let generic_ty = generic_kind. to_ty ( tcx) ;
925925 let Some ( subject) = self . try_promote_type_test_subject ( infcx, generic_ty) else {
@@ -947,7 +947,7 @@ impl<'tcx> RegionInferenceContext<'tcx> {
947947 propagated_outlives_requirements. push ( ClosureOutlivesRequirement {
948948 subject,
949949 outlived_free_region : static_r,
950- blame_span : locations . span ( body ) ,
950+ blame_span : type_test . span ,
951951 category : ConstraintCategory :: Boring ,
952952 } ) ;
953953
@@ -999,7 +999,7 @@ impl<'tcx> RegionInferenceContext<'tcx> {
999999 let requirement = ClosureOutlivesRequirement {
10001000 subject,
10011001 outlived_free_region : upper_bound,
1002- blame_span : locations . span ( body ) ,
1002+ blame_span : type_test . span ,
10031003 category : ConstraintCategory :: Boring ,
10041004 } ;
10051005 debug ! ( "try_promote_type_test: pushing {:#?}" , requirement) ;
0 commit comments