remove a hack that is now useless

This commit is contained in:
Oliver Schneider 2017-02-10 16:26:59 +01:00
parent 0b86d30594
commit 1e7481f96e

View file

@ -116,16 +116,6 @@ impl<'tcx> Global<'tcx> {
impl<'a, 'tcx> EvalContext<'a, 'tcx> {
pub(super) fn eval_and_read_lvalue(&mut self, lvalue: &mir::Lvalue<'tcx>) -> EvalResult<'tcx, Value> {
if let mir::Lvalue::Projection(ref proj) = *lvalue {
if let mir::Lvalue::Local(index) = proj.base {
if let Value::ByValPair(a, b) = self.frame().get_local(index, None) {
if let mir::ProjectionElem::Field(ref field, _) = proj.elem {
let val = [a, b][field.index()];
return Ok(Value::ByVal(val));
}
}
}
}
let lvalue = self.eval_lvalue(lvalue)?;
Ok(self.read_lvalue(lvalue))
}