@@ -228,15 +228,14 @@ pub struct Evaluator<'tcx> {
228
228
pub ( crate ) tls : TlsData < ' tcx > ,
229
229
}
230
230
231
- impl < ' mir , ' tcx > Machine < ' mir , ' tcx > for Evaluator < ' tcx > {
231
+ impl < ' a , ' mir , ' tcx > Machine < ' a , ' mir , ' tcx > for Evaluator < ' tcx > {
232
232
type MemoryData = ( ) ;
233
233
type MemoryKinds = MiriMemoryKind ;
234
234
235
235
const MUT_STATIC_KIND : Option < MiriMemoryKind > = Some ( MiriMemoryKind :: MutStatic ) ;
236
- const DETECT_LOOPS : bool = false ;
237
236
238
237
/// Returns Ok() when the function was handled, fail otherwise
239
- fn find_fn < ' a > (
238
+ fn find_fn (
240
239
ecx : & mut EvalContext < ' a , ' mir , ' tcx , Self > ,
241
240
instance : ty:: Instance < ' tcx > ,
242
241
args : & [ OpTy < ' tcx > ] ,
@@ -246,7 +245,7 @@ impl<'mir, 'tcx> Machine<'mir, 'tcx> for Evaluator<'tcx> {
246
245
ecx. find_fn ( instance, args, dest, ret)
247
246
}
248
247
249
- fn call_intrinsic < ' a > (
248
+ fn call_intrinsic (
250
249
ecx : & mut rustc_mir:: interpret:: EvalContext < ' a , ' mir , ' tcx , Self > ,
251
250
instance : ty:: Instance < ' tcx > ,
252
251
args : & [ OpTy < ' tcx > ] ,
@@ -255,7 +254,7 @@ impl<'mir, 'tcx> Machine<'mir, 'tcx> for Evaluator<'tcx> {
255
254
ecx. call_intrinsic ( instance, args, dest)
256
255
}
257
256
258
- fn ptr_op < ' a > (
257
+ fn ptr_op (
259
258
ecx : & rustc_mir:: interpret:: EvalContext < ' a , ' mir , ' tcx , Self > ,
260
259
bin_op : mir:: BinOp ,
261
260
left : Scalar ,
@@ -266,7 +265,7 @@ impl<'mir, 'tcx> Machine<'mir, 'tcx> for Evaluator<'tcx> {
266
265
ecx. ptr_op ( bin_op, left, left_layout, right, right_layout)
267
266
}
268
267
269
- fn box_alloc < ' a > (
268
+ fn box_alloc (
270
269
ecx : & mut EvalContext < ' a , ' mir , ' tcx , Self > ,
271
270
dest : PlaceTy < ' tcx > ,
272
271
) -> EvalResult < ' tcx > {
@@ -305,7 +304,7 @@ impl<'mir, 'tcx> Machine<'mir, 'tcx> for Evaluator<'tcx> {
305
304
Ok ( ( ) )
306
305
}
307
306
308
- fn find_foreign_static < ' a > (
307
+ fn find_foreign_static (
309
308
tcx : TyCtxtAt < ' a , ' tcx , ' tcx > ,
310
309
def_id : DefId ,
311
310
) -> EvalResult < ' tcx , & ' tcx Allocation > {
@@ -329,7 +328,7 @@ impl<'mir, 'tcx> Machine<'mir, 'tcx> for Evaluator<'tcx> {
329
328
Ok ( alloc)
330
329
}
331
330
332
- fn validation_op < ' a > (
331
+ fn validation_op (
333
332
_ecx : & mut EvalContext < ' a , ' mir , ' tcx , Self > ,
334
333
_op : :: rustc:: mir:: ValidationOp ,
335
334
_operand : & :: rustc:: mir:: ValidationOperand < ' tcx , :: rustc:: mir:: Place < ' tcx > > ,
@@ -338,4 +337,10 @@ impl<'mir, 'tcx> Machine<'mir, 'tcx> for Evaluator<'tcx> {
338
337
//ecx.validation_op(op, operand)
339
338
Ok ( ( ) )
340
339
}
340
+
341
+ fn before_terminator ( _ecx : & mut EvalContext < ' a , ' mir , ' tcx , Self > ) -> EvalResult < ' tcx >
342
+ {
343
+ // We are not interested in detecting loops
344
+ Ok ( ( ) )
345
+ }
341
346
}
0 commit comments