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
This commit is contained in:
Mazdak Farrokhzad 2019-05-26 02:13:35 +02:00 committed by GitHub
commit 8d247e716b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -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 {