]> git.lizzy.rs Git - rust.git/commitdiff
Remove unused eval_operand_and_layout fn.
authorScott Olson <scott@solson.me>
Sun, 24 Apr 2016 02:46:27 +0000 (20:46 -0600)
committerScott Olson <scott@solson.me>
Sun, 24 Apr 2016 02:46:27 +0000 (20:46 -0600)
src/interpreter.rs

index 5eea525a54322d056828dea66b2ac768d2c69649..636aa27240b550c3d303651169163a3ab09cd8c2 100644 (file)
@@ -741,23 +741,14 @@ fn eval_assignment(&mut self, lvalue: &mir::Lvalue<'tcx>, rvalue: &mir::Rvalue<'
     }
 
     fn eval_operand(&mut self, op: &mir::Operand<'tcx>) -> EvalResult<Pointer> {
-        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!(),
                 }
             }