Skip to content

Commit ab708f5

Browse files
committed
The return place's layout is only used once per frame, so caching doesn't help
1 parent 4165c89 commit ab708f5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/librustc_mir/interpret/place.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -624,7 +624,7 @@ where
624624
// their layout on return.
625625
PlaceTy {
626626
place: *return_place,
627-
layout: self.layout_of_local(self.frame(), mir::RETURN_PLACE, None)?,
627+
layout: self.layout_of(self.frame().mir.return_ty())?,
628628
},
629629
None => return err!(InvalidNullPointerUsage),
630630
},

0 commit comments

Comments
 (0)