split eval_and_read_lvalue into two functions
This commit is contained in:
parent
24be49f7dd
commit
bef879083e
@ -851,8 +851,12 @@ impl<'a, 'tcx> EvalContext<'a, 'tcx> {
|
||||
}
|
||||
}
|
||||
}
|
||||
let lvalue = self.eval_lvalue(lvalue)?;
|
||||
self.read_lvalue(lvalue)
|
||||
}
|
||||
|
||||
match self.eval_lvalue(lvalue)? {
|
||||
fn read_lvalue(&mut self, lvalue: Lvalue<'tcx>) -> EvalResult<'tcx, Value> {
|
||||
match lvalue {
|
||||
Lvalue::Ptr { ptr, extra } => {
|
||||
assert_eq!(extra, LvalueExtra::None);
|
||||
Ok(Value::ByRef(ptr))
|
||||
|
Loading…
x
Reference in New Issue
Block a user