Skip to content

Commit e6aa4b8

Browse files
committed
Add comment to explain why we change the layout for Projection
1 parent f492693 commit e6aa4b8

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/librustc_mir/interpret/operand.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -475,6 +475,8 @@ impl<'a, 'mir, 'tcx, M: Machine<'a, 'mir, 'tcx>> InterpretCx<'a, 'mir, 'tcx, M>
475475
PlaceBase::Local(mir::RETURN_PLACE) => return err!(ReadFromReturnPointer),
476476
PlaceBase::Local(local) => {
477477
// FIXME use place_projection.is_empty() when is available
478+
// Do not use the layout passed in as argument if the base we are looking at
479+
// here is not the entire place.
478480
let layout = if let Place::Base(_) = mir_place {
479481
layout
480482
} else {

0 commit comments

Comments
 (0)