@@ -87,7 +87,7 @@ impl<'tcx> TypeFoldable<'tcx> for Terminator<'tcx> {
87
87
Terminator { source_info : self . source_info , kind }
88
88
}
89
89
90
- fn super_visit_with < V : TypeVisitor < ' tcx > > ( & self , visitor : & mut V ) -> ControlFlow < ( ) > {
90
+ fn super_visit_with < V : TypeVisitor < ' tcx > > ( & self , visitor : & mut V ) -> ControlFlow < V :: BreakTy > {
91
91
use crate :: mir:: TerminatorKind :: * ;
92
92
93
93
match self . kind {
@@ -144,7 +144,7 @@ impl<'tcx> TypeFoldable<'tcx> for GeneratorKind {
144
144
self
145
145
}
146
146
147
- fn super_visit_with < V : TypeVisitor < ' tcx > > ( & self , _: & mut V ) -> ControlFlow < ( ) > {
147
+ fn super_visit_with < V : TypeVisitor < ' tcx > > ( & self , _: & mut V ) -> ControlFlow < V :: BreakTy > {
148
148
ControlFlow :: CONTINUE
149
149
}
150
150
}
@@ -154,7 +154,7 @@ impl<'tcx> TypeFoldable<'tcx> for Place<'tcx> {
154
154
Place { local : self . local . fold_with ( folder) , projection : self . projection . fold_with ( folder) }
155
155
}
156
156
157
- fn super_visit_with < V : TypeVisitor < ' tcx > > ( & self , visitor : & mut V ) -> ControlFlow < ( ) > {
157
+ fn super_visit_with < V : TypeVisitor < ' tcx > > ( & self , visitor : & mut V ) -> ControlFlow < V :: BreakTy > {
158
158
self . local . visit_with ( visitor) ?;
159
159
self . projection . visit_with ( visitor)
160
160
}
@@ -165,7 +165,7 @@ impl<'tcx> TypeFoldable<'tcx> for &'tcx ty::List<PlaceElem<'tcx>> {
165
165
ty:: util:: fold_list ( self , folder, |tcx, v| tcx. intern_place_elems ( v) )
166
166
}
167
167
168
- fn super_visit_with < V : TypeVisitor < ' tcx > > ( & self , visitor : & mut V ) -> ControlFlow < ( ) > {
168
+ fn super_visit_with < V : TypeVisitor < ' tcx > > ( & self , visitor : & mut V ) -> ControlFlow < V :: BreakTy > {
169
169
self . iter ( ) . try_for_each ( |t| t. visit_with ( visitor) )
170
170
}
171
171
}
@@ -211,7 +211,7 @@ impl<'tcx> TypeFoldable<'tcx> for Rvalue<'tcx> {
211
211
}
212
212
}
213
213
214
- fn super_visit_with < V : TypeVisitor < ' tcx > > ( & self , visitor : & mut V ) -> ControlFlow < ( ) > {
214
+ fn super_visit_with < V : TypeVisitor < ' tcx > > ( & self , visitor : & mut V ) -> ControlFlow < V :: BreakTy > {
215
215
use crate :: mir:: Rvalue :: * ;
216
216
match * self {
217
217
Use ( ref op) => op. visit_with ( visitor) ,
@@ -266,7 +266,7 @@ impl<'tcx> TypeFoldable<'tcx> for Operand<'tcx> {
266
266
}
267
267
}
268
268
269
- fn super_visit_with < V : TypeVisitor < ' tcx > > ( & self , visitor : & mut V ) -> ControlFlow < ( ) > {
269
+ fn super_visit_with < V : TypeVisitor < ' tcx > > ( & self , visitor : & mut V ) -> ControlFlow < V :: BreakTy > {
270
270
match * self {
271
271
Operand :: Copy ( ref place) | Operand :: Move ( ref place) => place. visit_with ( visitor) ,
272
272
Operand :: Constant ( ref c) => c. visit_with ( visitor) ,
@@ -290,7 +290,10 @@ impl<'tcx> TypeFoldable<'tcx> for PlaceElem<'tcx> {
290
290
}
291
291
}
292
292
293
- fn super_visit_with < Vs : TypeVisitor < ' tcx > > ( & self , visitor : & mut Vs ) -> ControlFlow < ( ) > {
293
+ fn super_visit_with < Vs : TypeVisitor < ' tcx > > (
294
+ & self ,
295
+ visitor : & mut Vs ,
296
+ ) -> ControlFlow < Vs :: BreakTy > {
294
297
use crate :: mir:: ProjectionElem :: * ;
295
298
296
299
match self {
@@ -305,7 +308,7 @@ impl<'tcx> TypeFoldable<'tcx> for Field {
305
308
fn super_fold_with < F : TypeFolder < ' tcx > > ( self , _: & mut F ) -> Self {
306
309
self
307
310
}
308
- fn super_visit_with < V : TypeVisitor < ' tcx > > ( & self , _: & mut V ) -> ControlFlow < ( ) > {
311
+ fn super_visit_with < V : TypeVisitor < ' tcx > > ( & self , _: & mut V ) -> ControlFlow < V :: BreakTy > {
309
312
ControlFlow :: CONTINUE
310
313
}
311
314
}
@@ -314,7 +317,7 @@ impl<'tcx> TypeFoldable<'tcx> for GeneratorSavedLocal {
314
317
fn super_fold_with < F : TypeFolder < ' tcx > > ( self , _: & mut F ) -> Self {
315
318
self
316
319
}
317
- fn super_visit_with < V : TypeVisitor < ' tcx > > ( & self , _: & mut V ) -> ControlFlow < ( ) > {
320
+ fn super_visit_with < V : TypeVisitor < ' tcx > > ( & self , _: & mut V ) -> ControlFlow < V :: BreakTy > {
318
321
ControlFlow :: CONTINUE
319
322
}
320
323
}
@@ -323,7 +326,7 @@ impl<'tcx, R: Idx, C: Idx> TypeFoldable<'tcx> for BitMatrix<R, C> {
323
326
fn super_fold_with < F : TypeFolder < ' tcx > > ( self , _: & mut F ) -> Self {
324
327
self
325
328
}
326
- fn super_visit_with < V : TypeVisitor < ' tcx > > ( & self , _: & mut V ) -> ControlFlow < ( ) > {
329
+ fn super_visit_with < V : TypeVisitor < ' tcx > > ( & self , _: & mut V ) -> ControlFlow < V :: BreakTy > {
327
330
ControlFlow :: CONTINUE
328
331
}
329
332
}
@@ -336,7 +339,7 @@ impl<'tcx> TypeFoldable<'tcx> for Constant<'tcx> {
336
339
literal : self . literal . fold_with ( folder) ,
337
340
}
338
341
}
339
- fn super_visit_with < V : TypeVisitor < ' tcx > > ( & self , visitor : & mut V ) -> ControlFlow < ( ) > {
342
+ fn super_visit_with < V : TypeVisitor < ' tcx > > ( & self , visitor : & mut V ) -> ControlFlow < V :: BreakTy > {
340
343
self . literal . visit_with ( visitor)
341
344
}
342
345
}
0 commit comments