@@ -127,8 +127,7 @@ impl<'a, 'tcx> TypeVisitor<'tcx> for UnresolvedTypeFinder<'a, 'tcx> {
127
127
// Since we called `shallow_resolve` above, this must
128
128
// be an (as yet...) unresolved inference variable.
129
129
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 ( ) ;
132
131
if let TypeVariableOrigin {
133
132
kind : TypeVariableOriginKind :: TypeParameterDefinition ( _, _) ,
134
133
span,
@@ -160,7 +159,7 @@ impl<'a, 'tcx> TypeVisitor<'tcx> for UnresolvedTypeFinder<'a, 'tcx> {
160
159
/// Full type resolution replaces all type and region variables with
161
160
/// their concrete results. If any variable cannot be replaced (never unified, etc)
162
161
/// 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 >
164
163
where
165
164
T : TypeFoldable < ' tcx > ,
166
165
{
@@ -174,12 +173,12 @@ where
174
173
175
174
// N.B. This type is not public because the protocol around checking the
176
175
// `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 > ,
179
178
err : Option < FixupError < ' tcx > > ,
180
179
}
181
180
182
- impl < ' a , ' tcx > TypeFolder < ' tcx > for FullTypeResolver < ' a , ' tcx > {
181
+ impl < ' a , ' tcx > TypeFolder < ' tcx > for FullTypeResolver < ' a , ' _ , ' tcx > {
183
182
fn tcx < ' b > ( & ' b self ) -> TyCtxt < ' tcx > {
184
183
self . infcx . tcx
185
184
}
0 commit comments