Skip to content

Commit 5a8b0ab

Browse files
committed
don't clone the MIR Rc in every iteration
1 parent 8398781 commit 5a8b0ab

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/interpreter.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,10 +186,10 @@ impl<'a, 'b, 'mir, 'tcx> FnEvalContext<'a, 'b, 'mir, 'tcx> {
186186
fn run(&mut self) -> EvalResult<()> {
187187
'outer: while !self.stack.is_empty() {
188188
let mut current_block = self.frame().next_block;
189+
let current_mir = self.mir();
189190

190191
loop {
191192
trace!("// {:?}", current_block);
192-
let current_mir = self.mir().clone(); // Cloning a reference.
193193
let block_data = current_mir.basic_block_data(current_block);
194194

195195
for stmt in &block_data.statements {

0 commit comments

Comments
 (0)