diff options
| author | bjorn3 <bjorn3@users.noreply.github.com> | 2018-10-21 16:16:23 +0200 |
|---|---|---|
| committer | bjorn3 <bjorn3@users.noreply.github.com> | 2018-10-21 16:16:23 +0200 |
| commit | b178553e555bd3634005878bcd90e2f8295289f6 (patch) | |
| tree | 175a1e5656d9f70bb5aae5ffa0db498d7d29fff1 | |
| parent | c32cf25689d7b8f2498a875716f855ee5cdcf16c (diff) | |
| download | rust-b178553e555bd3634005878bcd90e2f8295289f6.tar.gz rust-b178553e555bd3634005878bcd90e2f8295289f6.zip | |
Address review comments
| -rw-r--r-- | src/librustc_mir/interpret/operand.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/librustc_mir/interpret/operand.rs b/src/librustc_mir/interpret/operand.rs index 744856c805c..71b2f4b53a6 100644 --- a/src/librustc_mir/interpret/operand.rs +++ b/src/librustc_mir/interpret/operand.rs @@ -572,12 +572,15 @@ impl<'a, 'mir, 'tcx, M: Machine<'a, 'mir, 'tcx>> EvalContext<'a, 'mir, 'tcx, M> } /// 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<TyLayout<'tcx>>, ) -> 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))?; |
