Skip to content

Commit 3aace9a

Browse files
authored
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.
2 parents db2850c + 60d5d65 commit 3aace9a

File tree

2 files changed

+1
-6
lines changed

2 files changed

+1
-6
lines changed

compiler/rustc_const_eval/src/const_eval/eval_queries.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ fn eval_body_using_ecx<'mir, 'tcx>(
6666
)?;
6767

6868
// The main interpreter loop.
69-
ecx.run()?;
69+
while ecx.step()? {}
7070

7171
// Intern the result
7272
let intern_kind = if cid.promoted.is_some() {

compiler/rustc_const_eval/src/interpret/step.rs

-5
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,6 @@ fn binop_right_homogeneous(op: mir::BinOp) -> bool {
3232
}
3333

3434
impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
35-
pub fn run(&mut self) -> InterpResult<'tcx> {
36-
while self.step()? {}
37-
Ok(())
38-
}
39-
4035
/// Returns `true` as long as there are more things to do.
4136
///
4237
/// This is used by [priroda](https://github.com/oli-obk/priroda)

0 commit comments

Comments
 (0)