diff --git a/src/librustc_mir/interpret/operand.rs b/src/librustc_mir/interpret/operand.rs index 744856c805c4c652419238d1bb1ff3f17b0fc3d7..71b2f4b53a60c4df84a82e78d6a752862a2b6dcc 100644 --- a/src/librustc_mir/interpret/operand.rs +++ b/src/librustc_mir/interpret/operand.rs @@ -572,12 +572,15 @@ pub fn operand_projection( } /// This is used by [priroda](https://github.com/oli-obk/priroda) to get an OpTy from a local + /// + /// When you know the layout of the local in advance, you can pass it as last argument pub fn access_local( &self, frame: &super::Frame<'mir, 'tcx, M::PointerTag>, local: mir::Local, layout: Option>, ) -> EvalResult<'tcx, OpTy<'tcx, M::PointerTag>> { + assert_ne!(local, mir::RETURN_PLACE); let op = *frame.locals[local].access()?; let layout = from_known_layout(layout, || self.layout_of_local(frame, local))?;