@@ -178,9 +178,7 @@ impl<'a, 'b, 'gcx, 'tcx> TypeVerifier<'a, 'b, 'gcx, 'tcx> {
178
178
let sty = self . sanitize_type ( place, sty) ;
179
179
let ty = self . tcx ( ) . type_of ( def_id) ;
180
180
let ty = self . cx . normalize ( & ty, location) ;
181
- if let Err ( terr) = self . cx
182
- . eq_types ( self . last_span , ty, sty, location. at_self ( ) )
183
- {
181
+ if let Err ( terr) = self . cx . eq_types ( ty, sty, location. at_self ( ) ) {
184
182
span_mirbug ! (
185
183
self ,
186
184
place,
@@ -230,7 +228,6 @@ impl<'a, 'b, 'gcx, 'tcx> TypeVerifier<'a, 'b, 'gcx, 'tcx> {
230
228
debug ! ( "sanitize_projection: {:?} {:?} {:?}" , base, pi, place) ;
231
229
let tcx = self . tcx ( ) ;
232
230
let base_ty = base. to_ty ( tcx) ;
233
- let span = self . last_span ;
234
231
match * pi {
235
232
ProjectionElem :: Deref => {
236
233
let deref_ty = base_ty. builtin_deref ( true , ty:: LvaluePreference :: NoPreference ) ;
@@ -316,7 +313,7 @@ impl<'a, 'b, 'gcx, 'tcx> TypeVerifier<'a, 'b, 'gcx, 'tcx> {
316
313
let fty = self . sanitize_type ( place, fty) ;
317
314
match self . field_ty ( place, base, field, location) {
318
315
Ok ( ty) => {
319
- if let Err ( terr) = self . cx . eq_types ( span , ty, fty, location. at_self ( ) ) {
316
+ if let Err ( terr) = self . cx . eq_types ( ty, fty, location. at_self ( ) ) {
320
317
span_mirbug ! (
321
318
self ,
322
319
place,
@@ -529,13 +526,7 @@ impl<'a, 'gcx, 'tcx> TypeChecker<'a, 'gcx, 'tcx> {
529
526
} )
530
527
}
531
528
532
- fn eq_types (
533
- & mut self ,
534
- _span : Span ,
535
- a : Ty < ' tcx > ,
536
- b : Ty < ' tcx > ,
537
- locations : Locations ,
538
- ) -> UnitResult < ' tcx > {
529
+ fn eq_types ( & mut self , a : Ty < ' tcx > , b : Ty < ' tcx > , locations : Locations ) -> UnitResult < ' tcx > {
539
530
self . fully_perform_op ( locations, |this| {
540
531
this. infcx
541
532
. at ( & this. misc ( this. last_span ) , this. param_env )
0 commit comments