about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMazdak Farrokhzad <twingoow@gmail.com>2019-05-26 02:13:35 +0200
committerGitHub <noreply@github.com>2019-05-26 02:13:35 +0200
commit8d247e716bc1ed4039f9c696ccf0eb975975f295 (patch)
tree9e3093cd669d9ca6a962897ff165f783a9998894
parent6ae3c2b2a432b092ac70cc02d89f73eda2aaa9a2 (diff)
parente6aa4b8033417732e2906bd9fdb8eec976f92c3d (diff)
downloadrust-8d247e716bc1ed4039f9c696ccf0eb975975f295.tar.gz
rust-8d247e716bc1ed4039f9c696ccf0eb975975f295.zip
Rollup merge of #61193 - spastorino:add-comment, r=RalfJung
Add comment to explain why we change the layout for Projection

r? @RalfJung

Addresses the comment in https://github.com/rust-lang/rust/pull/61104/files#r287556257
-rw-r--r--src/librustc_mir/interpret/operand.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/librustc_mir/interpret/operand.rs b/src/librustc_mir/interpret/operand.rs
index e26b147ea58..de788a22886 100644
--- a/src/librustc_mir/interpret/operand.rs
+++ b/src/librustc_mir/interpret/operand.rs
@@ -475,6 +475,8 @@ impl<'a, 'mir, 'tcx, M: Machine<'a, 'mir, 'tcx>> InterpretCx<'a, 'mir, 'tcx, M>
                 PlaceBase::Local(mir::RETURN_PLACE) => return err!(ReadFromReturnPointer),
                 PlaceBase::Local(local) => {
                     // FIXME use place_projection.is_empty() when is available
+                    // Do not use the layout passed in as argument if the base we are looking at
+                    // here is not the entire place.
                     let layout = if let Place::Base(_) = mir_place {
                         layout
                     } else {