about summary refs log tree commit diff
diff options
context:
space:
mode:
authorSantiago Pastorino <spastorino@gmail.com>2019-05-25 22:28:15 +0200
committerSantiago Pastorino <spastorino@gmail.com>2019-05-25 22:28:15 +0200
commite6aa4b8033417732e2906bd9fdb8eec976f92c3d (patch)
tree3ffdc0000e86c4739afff840445c9cda3a44a936
parentf492693982d1e252f5411ae3e4d560ab0dfea48a (diff)
downloadrust-e6aa4b8033417732e2906bd9fdb8eec976f92c3d.tar.gz
rust-e6aa4b8033417732e2906bd9fdb8eec976f92c3d.zip
Add comment to explain why we change the layout for Projection
-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 {