@@ -13,18 +13,18 @@ use std::ops::ControlFlow;
13
13
/// been unified with (similar to `shallow_resolve`, but deep). This is
14
14
/// useful for printing messages etc but also required at various
15
15
/// points for correctness.
16
- pub struct OpportunisticVarResolver < ' a , ' tcx > {
17
- infcx : & ' a InferCtxt < ' a , ' tcx > ,
16
+ pub struct OpportunisticVarResolver < ' a , ' cx , ' tcx > {
17
+ infcx : & ' a mut InferCtxt < ' cx , ' tcx > ,
18
18
}
19
19
20
- impl < ' a , ' tcx > OpportunisticVarResolver < ' a , ' tcx > {
20
+ impl < ' a , ' cx , ' tcx > OpportunisticVarResolver < ' a , ' cx , ' tcx > {
21
21
#[ inline]
22
- pub fn new ( infcx : & ' a InferCtxt < ' a , ' tcx > ) -> Self {
22
+ pub fn new ( infcx : & ' a mut InferCtxt < ' cx , ' tcx > ) -> Self {
23
23
OpportunisticVarResolver { infcx }
24
24
}
25
25
}
26
26
27
- impl < ' a , ' tcx > TypeFolder < ' tcx > for OpportunisticVarResolver < ' a , ' tcx > {
27
+ impl < ' a , ' tcx > TypeFolder < ' tcx > for OpportunisticVarResolver < ' a , ' _ , ' tcx > {
28
28
fn tcx < ' b > ( & ' b self ) -> TyCtxt < ' tcx > {
29
29
self . infcx . tcx
30
30
}
@@ -108,17 +108,17 @@ impl<'a, 'tcx> TypeFolder<'tcx> for OpportunisticRegionResolver<'a, 'tcx> {
108
108
/// type variables that don't yet have a value. The first unresolved type is stored.
109
109
/// It does not construct the fully resolved type (which might
110
110
/// involve some hashing and so forth).
111
- pub struct UnresolvedTypeFinder < ' a , ' tcx > {
112
- infcx : & ' a InferCtxt < ' a , ' tcx > ,
111
+ pub struct UnresolvedTypeFinder < ' a , ' cx , ' tcx > {
112
+ infcx : & ' a mut InferCtxt < ' cx , ' tcx > ,
113
113
}
114
114
115
- impl < ' a , ' tcx > UnresolvedTypeFinder < ' a , ' tcx > {
116
- pub fn new ( infcx : & ' a InferCtxt < ' a , ' tcx > ) -> Self {
115
+ impl < ' a , ' cx , ' tcx > UnresolvedTypeFinder < ' a , ' cx , ' tcx > {
116
+ pub fn new ( infcx : & ' a mut InferCtxt < ' cx , ' tcx > ) -> Self {
117
117
UnresolvedTypeFinder { infcx }
118
118
}
119
119
}
120
120
121
- impl < ' a , ' tcx > TypeVisitor < ' tcx > for UnresolvedTypeFinder < ' a , ' tcx > {
121
+ impl < ' a , ' tcx > TypeVisitor < ' tcx > for UnresolvedTypeFinder < ' a , ' _ , ' tcx > {
122
122
type BreakTy = ( Ty < ' tcx > , Option < Span > ) ;
123
123
fn visit_ty ( & mut self , t : Ty < ' tcx > ) -> ControlFlow < Self :: BreakTy > {
124
124
let t = self . infcx . shallow_resolve ( t) ;
0 commit comments