Pass PlaceTy by reference not value
This commit is contained in:
parent
e915cf45dc
commit
fe0c46d07e
13 changed files with 91 additions and 87 deletions
|
@ -462,9 +462,9 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
|
|||
#[inline(always)]
|
||||
pub fn place_to_op(
|
||||
&self,
|
||||
place: PlaceTy<'tcx, M::PointerTag>,
|
||||
place: &PlaceTy<'tcx, M::PointerTag>,
|
||||
) -> InterpResult<'tcx, OpTy<'tcx, M::PointerTag>> {
|
||||
let op = match *place {
|
||||
let op = match **place {
|
||||
Place::Ptr(mplace) => Operand::Indirect(mplace),
|
||||
Place::Local { frame, local } => {
|
||||
*self.access_local(&self.stack()[frame], local, None)?
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue