@@ -127,8 +127,7 @@ impl<'a, 'tcx> TypeVisitor<'tcx> for UnresolvedTypeFinder<'a, 'tcx> {
127127 // Since we called `shallow_resolve` above, this must
128128 // be an (as yet...) unresolved inference variable.
129129 let ty_var_span = if let ty:: TyVar ( ty_vid) = infer_ty {
130- let mut inner = self . infcx . inner ;
131- let ty_vars = & inner. type_variables ( ) ;
130+ let ty_vars = & self . infcx . inner . type_variables ( ) ;
132131 if let TypeVariableOrigin {
133132 kind : TypeVariableOriginKind :: TypeParameterDefinition ( _, _) ,
134133 span,
@@ -160,7 +159,7 @@ impl<'a, 'tcx> TypeVisitor<'tcx> for UnresolvedTypeFinder<'a, 'tcx> {
160159/// Full type resolution replaces all type and region variables with
161160/// their concrete results. If any variable cannot be replaced (never unified, etc)
162161/// then an `Err` result is returned.
163- pub fn fully_resolve < ' a , ' tcx , T > ( infcx : & InferCtxt < ' a , ' tcx > , value : T ) -> FixupResult < ' tcx , T >
162+ pub fn fully_resolve < ' a , ' tcx , T > ( infcx : & mut InferCtxt < ' a , ' tcx > , value : T ) -> FixupResult < ' tcx , T >
164163where
165164 T : TypeFoldable < ' tcx > ,
166165{
@@ -174,12 +173,12 @@ where
174173
175174// N.B. This type is not public because the protocol around checking the
176175// `err` field is not enforceable otherwise.
177- struct FullTypeResolver < ' a , ' tcx > {
178- infcx : & ' a InferCtxt < ' a , ' tcx > ,
176+ struct FullTypeResolver < ' a , ' cx , ' tcx > {
177+ infcx : & ' a mut InferCtxt < ' cx , ' tcx > ,
179178 err : Option < FixupError < ' tcx > > ,
180179}
181180
182- impl < ' a , ' tcx > TypeFolder < ' tcx > for FullTypeResolver < ' a , ' tcx > {
181+ impl < ' a , ' tcx > TypeFolder < ' tcx > for FullTypeResolver < ' a , ' _ , ' tcx > {
183182 fn tcx < ' b > ( & ' b self ) -> TyCtxt < ' tcx > {
184183 self . infcx . tcx
185184 }
0 commit comments