@@ -178,9 +178,7 @@ impl<'a, 'b, 'gcx, 'tcx> TypeVerifier<'a, 'b, 'gcx, 'tcx> {
178178 let sty = self . sanitize_type ( place, sty) ;
179179 let ty = self . tcx ( ) . type_of ( def_id) ;
180180 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 ( ) ) {
184182 span_mirbug ! (
185183 self ,
186184 place,
@@ -230,7 +228,6 @@ impl<'a, 'b, 'gcx, 'tcx> TypeVerifier<'a, 'b, 'gcx, 'tcx> {
230228 debug ! ( "sanitize_projection: {:?} {:?} {:?}" , base, pi, place) ;
231229 let tcx = self . tcx ( ) ;
232230 let base_ty = base. to_ty ( tcx) ;
233- let span = self . last_span ;
234231 match * pi {
235232 ProjectionElem :: Deref => {
236233 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> {
316313 let fty = self . sanitize_type ( place, fty) ;
317314 match self . field_ty ( place, base, field, location) {
318315 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 ( ) ) {
320317 span_mirbug ! (
321318 self ,
322319 place,
@@ -529,13 +526,7 @@ impl<'a, 'gcx, 'tcx> TypeChecker<'a, 'gcx, 'tcx> {
529526 } )
530527 }
531528
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 > {
539530 self . fully_perform_op ( locations, |this| {
540531 this. infcx
541532 . at ( & this. misc ( this. last_span ) , this. param_env )
0 commit comments