]> git.lizzy.rs Git - rust.git/commitdiff
interpret: get rid of run() function
authorRalf Jung <post@ralfj.de>
Sun, 27 Nov 2022 14:20:26 +0000 (15:20 +0100)
committerRalf Jung <post@ralfj.de>
Sun, 27 Nov 2022 14:20:26 +0000 (15:20 +0100)
compiler/rustc_const_eval/src/const_eval/eval_queries.rs
compiler/rustc_const_eval/src/interpret/step.rs

index c777a840f3fb661cfd56c25a51b38d6d9c811606..c27790d8887a377a67a59da57daa99ca84f5f9b3 100644 (file)
@@ -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() {
index 73f8bf4362e6086da6a1a3325e189c8dc8875850..60578246eedcccb01cf885385d53caa5839602f7 100644 (file)
@@ -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)