Skip to content

Commit 8d247e7

Browse files
authored
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
2 parents 6ae3c2b + e6aa4b8 commit 8d247e7

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/librustc_mir/interpret/operand.rs

+2
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)