@@ -214,8 +214,8 @@ pub struct TypeTest<'tcx> {
214
214
/// The region `'x` that the type must outlive.
215
215
pub lower_bound : RegionVid ,
216
216
217
- /// Where did this constraint arise and why?
218
- pub locations : Locations ,
217
+ /// The span to blame.
218
+ pub span : Span ,
219
219
220
220
/// A test which, if met by the region `'x`, proves that this type
221
221
/// constraint is satisfied.
@@ -870,13 +870,13 @@ impl<'tcx> RegionInferenceContext<'tcx> {
870
870
if deduplicate_errors. insert ( (
871
871
erased_generic_kind,
872
872
type_test. lower_bound ,
873
- type_test. locations ,
873
+ type_test. span ,
874
874
) ) {
875
875
debug ! (
876
876
"check_type_test: reporting error for erased_generic_kind={:?}, \
877
877
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 ,
880
880
) ;
881
881
882
882
errors_buffer. push ( RegionErrorKind :: TypeTestError { type_test : type_test. clone ( ) } ) ;
@@ -919,7 +919,7 @@ impl<'tcx> RegionInferenceContext<'tcx> {
919
919
) -> bool {
920
920
let tcx = infcx. tcx ;
921
921
922
- let TypeTest { generic_kind, lower_bound, locations , verify_bound : _ } = type_test;
922
+ let TypeTest { generic_kind, lower_bound, span : _ , verify_bound : _ } = type_test;
923
923
924
924
let generic_ty = generic_kind. to_ty ( tcx) ;
925
925
let Some ( subject) = self . try_promote_type_test_subject ( infcx, generic_ty) else {
@@ -947,7 +947,7 @@ impl<'tcx> RegionInferenceContext<'tcx> {
947
947
propagated_outlives_requirements. push ( ClosureOutlivesRequirement {
948
948
subject,
949
949
outlived_free_region : static_r,
950
- blame_span : locations . span ( body ) ,
950
+ blame_span : type_test . span ,
951
951
category : ConstraintCategory :: Boring ,
952
952
} ) ;
953
953
@@ -999,7 +999,7 @@ impl<'tcx> RegionInferenceContext<'tcx> {
999
999
let requirement = ClosureOutlivesRequirement {
1000
1000
subject,
1001
1001
outlived_free_region : upper_bound,
1002
- blame_span : locations . span ( body ) ,
1002
+ blame_span : type_test . span ,
1003
1003
category : ConstraintCategory :: Boring ,
1004
1004
} ;
1005
1005
debug ! ( "try_promote_type_test: pushing {:#?}" , requirement) ;
0 commit comments