Skip to content

Commit

Permalink
Add comment to explain why we change the layout for Projection
Browse files Browse the repository at this point in the history
  • Loading branch information
spastorino committed May 25, 2019
1 parent f492693 commit e6aa4b8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/librustc_mir/interpret/operand.rs
Expand Up @@ -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 {
Expand Down

0 comments on commit e6aa4b8

Please sign in to comment.