diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2022-11-28 17:25:49 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-11-28 17:25:49 +0100 |
| commit | 3aace9a641b80c9929a2218fe4d2923864d8ff50 (patch) | |
| tree | e1702cd3da648016c0ef8c435d1432941a33a662 | |
| parent | db2850c1fb959823f1473af5444a0835109e3125 (diff) | |
| parent | 60d5d65a4d7931ffa022453a433f433d395afdb9 (diff) | |
Rollup merge of #104982 - RalfJung:norun, r=oli-obk
interpret: get rid of run() function Miri needs its own loop anyway, so there's not much of a point in trying to share this code.
| -rw-r--r-- | compiler/rustc_const_eval/src/const_eval/eval_queries.rs | 2 | ||||
| -rw-r--r-- | compiler/rustc_const_eval/src/interpret/step.rs | 5 |
2 files changed, 1 insertions, 6 deletions
diff --git a/compiler/rustc_const_eval/src/const_eval/eval_queries.rs b/compiler/rustc_const_eval/src/const_eval/eval_queries.rs index c777a840f3f..c27790d8887 100644 --- a/compiler/rustc_const_eval/src/const_eval/eval_queries.rs +++ b/compiler/rustc_const_eval/src/const_eval/eval_queries.rs @@ -66,7 +66,7 @@ fn eval_body_using_ecx<'mir, 'tcx>( )?; // The main interpreter loop. - ecx.run()?; + while ecx.step()? {} // Intern the result let intern_kind = if cid.promoted.is_some() { diff --git a/compiler/rustc_const_eval/src/interpret/step.rs b/compiler/rustc_const_eval/src/interpret/step.rs index 73f8bf4362e..60578246eed 100644 --- a/compiler/rustc_const_eval/src/interpret/step.rs +++ b/compiler/rustc_const_eval/src/interpret/step.rs @@ -32,11 +32,6 @@ fn binop_right_homogeneous(op: mir::BinOp) -> bool { } impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> { - pub fn run(&mut self) -> InterpResult<'tcx> { - while self.step()? {} - Ok(()) - } - /// Returns `true` as long as there are more things to do. /// /// This is used by [priroda](https://github.com/oli-obk/priroda) |
