@@ -5,7 +5,7 @@ use rustc_middle::ty::fold::TypeFoldable;
5
5
use rustc_middle:: ty:: relate:: RelateResult ;
6
6
use rustc_middle:: ty:: relate:: combine:: PredicateEmittingRelation ;
7
7
use rustc_middle:: ty:: { self , Ty , TyCtxt } ;
8
- use rustc_span:: { DUMMY_SP , ErrorGuaranteed } ;
8
+ use rustc_span:: { DUMMY_SP , ErrorGuaranteed , Span } ;
9
9
10
10
use super :: { BoundRegionConversionTime , InferCtxt , RegionVariableOrigin , SubregionOrigin } ;
11
11
@@ -203,23 +203,23 @@ impl<'tcx> rustc_type_ir::InferCtxtLike for InferCtxt<'tcx> {
203
203
self . probe ( |_| probe ( ) )
204
204
}
205
205
206
- fn sub_regions ( & self , sub : ty:: Region < ' tcx > , sup : ty:: Region < ' tcx > ) {
206
+ fn sub_regions ( & self , sub : ty:: Region < ' tcx > , sup : ty:: Region < ' tcx > , span : Span ) {
207
207
self . inner . borrow_mut ( ) . unwrap_region_constraints ( ) . make_subregion (
208
- SubregionOrigin :: RelateRegionParamBound ( DUMMY_SP , None ) ,
208
+ SubregionOrigin :: RelateRegionParamBound ( span , None ) ,
209
209
sub,
210
210
sup,
211
211
) ;
212
212
}
213
213
214
- fn equate_regions ( & self , a : ty:: Region < ' tcx > , b : ty:: Region < ' tcx > ) {
214
+ fn equate_regions ( & self , a : ty:: Region < ' tcx > , b : ty:: Region < ' tcx > , span : Span ) {
215
215
self . inner . borrow_mut ( ) . unwrap_region_constraints ( ) . make_eqregion (
216
- SubregionOrigin :: RelateRegionParamBound ( DUMMY_SP , None ) ,
216
+ SubregionOrigin :: RelateRegionParamBound ( span , None ) ,
217
217
a,
218
218
b,
219
219
) ;
220
220
}
221
221
222
- fn register_ty_outlives ( & self , ty : Ty < ' tcx > , r : ty:: Region < ' tcx > ) {
223
- self . register_region_obligation_with_cause ( ty, r, & ObligationCause :: dummy ( ) ) ;
222
+ fn register_ty_outlives ( & self , ty : Ty < ' tcx > , r : ty:: Region < ' tcx > , span : Span ) {
223
+ self . register_region_obligation_with_cause ( ty, r, & ObligationCause :: dummy_with_span ( span ) ) ;
224
224
}
225
225
}
0 commit comments