Remove unused eval_operand_and_layout fn.
This commit is contained in:
parent
500cd25627
commit
3fd2ee9ddc
1 changed files with 2 additions and 11 deletions
|
@ -741,23 +741,14 @@ impl<'a, 'tcx: 'a> Interpreter<'a, 'tcx> {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn eval_operand(&mut self, op: &mir::Operand<'tcx>) -> EvalResult<Pointer> {
|
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::*;
|
use rustc::mir::repr::Operand::*;
|
||||||
match *op {
|
match *op {
|
||||||
Consume(ref lvalue) =>
|
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, .. }) => {
|
Constant(mir::Constant { ref literal, ty, .. }) => {
|
||||||
use rustc::mir::repr::Literal::*;
|
use rustc::mir::repr::Literal::*;
|
||||||
match *literal {
|
match *literal {
|
||||||
Value { ref value } => Ok((
|
Value { ref value } => Ok(try!(self.const_to_ptr(value))),
|
||||||
try!(self.const_to_ptr(value)),
|
|
||||||
self.type_layout(ty),
|
|
||||||
)),
|
|
||||||
Item { .. } => unimplemented!(),
|
Item { .. } => unimplemented!(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue