From 3fd2ee9ddc1ce5677ca308b5c4e23010ade60e7b Mon Sep 17 00:00:00 2001 From: Scott Olson Date: Sat, 23 Apr 2016 20:46:27 -0600 Subject: [PATCH] Remove unused eval_operand_and_layout fn. --- src/interpreter.rs | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/src/interpreter.rs b/src/interpreter.rs index 5eea525a543..636aa27240b 100644 --- a/src/interpreter.rs +++ b/src/interpreter.rs @@ -741,23 +741,14 @@ impl<'a, 'tcx: 'a> Interpreter<'a, 'tcx> { } fn eval_operand(&mut self, op: &mir::Operand<'tcx>) -> EvalResult { - self.eval_operand_and_layout(op).map(|(p, _)| p) - } - - fn eval_operand_and_layout(&mut self, op: &mir::Operand<'tcx>) - -> EvalResult<(Pointer, &'tcx Layout)> - { use rustc::mir::repr::Operand::*; match *op { Consume(ref lvalue) => - Ok((try!(self.eval_lvalue(lvalue)).to_ptr(), self.lvalue_layout(lvalue))), + Ok(try!(self.eval_lvalue(lvalue)).to_ptr()), Constant(mir::Constant { ref literal, ty, .. }) => { use rustc::mir::repr::Literal::*; match *literal { - Value { ref value } => Ok(( - try!(self.const_to_ptr(value)), - self.type_layout(ty), - )), + Value { ref value } => Ok(try!(self.const_to_ptr(value))), Item { .. } => unimplemented!(), } }