Add comment to explain why we change the layout for Projection
This commit is contained in:
parent
f492693982
commit
e6aa4b8033
|
@ -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(mir::RETURN_PLACE) => return err!(ReadFromReturnPointer),
|
||||||
PlaceBase::Local(local) => {
|
PlaceBase::Local(local) => {
|
||||||
// FIXME use place_projection.is_empty() when is available
|
// 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 {
|
let layout = if let Place::Base(_) = mir_place {
|
||||||
layout
|
layout
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue