Skip to content

Commit 7d406c9

Browse files
committed
Fix errors
1 parent 3e62ba1 commit 7d406c9

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/librustc_mir/interpret/operand.rs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -775,11 +775,13 @@ impl<'a, 'mir, 'tcx, M: Machine<'a, 'mir, 'tcx>> EvalContext<'a, 'mir, 'tcx, M>
775775
/// This is used by [priroda](https://github.com/oli-obk/priroda) to get an OpTy from a local
776776
pub fn read_local_of_frame(
777777
&self,
778-
frame: &super::Frame,
778+
frame: &super::Frame<'mir, 'tcx>,
779779
local: mir::Local
780780
) -> EvalResult<'tcx, OpTy<'tcx>> {
781-
let op = frame.locals[local].access()?;
782-
let layout = self.layout_of_local(frame, local)?;
783-
OpTy { op, layout }
781+
let op = *frame.locals[local].access()?;
782+
let local_ty = frame.mir.local_decls[local].ty;
783+
let local_ty = self.monomorphize(local_ty, frame.instance.substs);
784+
let layout = self.layout_of(local_ty)?;
785+
Ok(OpTy { op, layout })
784786
}
785787
}

0 commit comments

Comments
 (0)