@@ -1441,7 +1441,7 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
14411441 if !value. needs_infer ( ) {
14421442 return value; // Avoid duplicated subst-folding.
14431443 }
1444- let mut r = InferenceLiteralEraser { infcx : self } ;
1444+ let mut r = InferenceLiteralEraser { tcx : self . tcx } ;
14451445 value. fold_with ( & mut r)
14461446 }
14471447
@@ -1798,19 +1798,19 @@ impl<'tcx> TyOrConstInferVar<'tcx> {
17981798
17991799/// Replace `{integer}` with `i32` and `{float}` with `f64`.
18001800/// Used only for diagnostics.
1801- struct InferenceLiteralEraser < ' a , ' tcx > {
1802- infcx : & ' a InferCtxt < ' a , ' tcx > ,
1801+ struct InferenceLiteralEraser < ' tcx > {
1802+ tcx : TyCtxt < ' tcx > ,
18031803}
18041804
1805- impl < ' a , ' tcx > TypeFolder < ' tcx > for InferenceLiteralEraser < ' a , ' tcx > {
1806- fn tcx < ' b > ( & ' b self ) -> TyCtxt < ' tcx > {
1807- self . infcx . tcx
1805+ impl < ' tcx > TypeFolder < ' tcx > for InferenceLiteralEraser < ' tcx > {
1806+ fn tcx ( & self ) -> TyCtxt < ' tcx > {
1807+ self . tcx
18081808 }
18091809
18101810 fn fold_ty ( & mut self , ty : Ty < ' tcx > ) -> Ty < ' tcx > {
18111811 match ty. kind ( ) {
1812- ty:: Infer ( ty:: IntVar ( _) | ty:: FreshIntTy ( _) ) => self . tcx ( ) . types . i32 ,
1813- ty:: Infer ( ty:: FloatVar ( _) | ty:: FreshFloatTy ( _) ) => self . tcx ( ) . types . f64 ,
1812+ ty:: Infer ( ty:: IntVar ( _) | ty:: FreshIntTy ( _) ) => self . tcx . types . i32 ,
1813+ ty:: Infer ( ty:: FloatVar ( _) | ty:: FreshFloatTy ( _) ) => self . tcx . types . f64 ,
18141814 _ => ty. super_fold_with ( self ) ,
18151815 }
18161816 }
0 commit comments