The return place's layout is only used once per frame, so caching doesn't help

This commit is contained in:
Oliver Scherer 2019-01-30 15:08:59 +01:00
parent 4165c890ed
commit ab708f5c6f

View file

@ -624,7 +624,7 @@ where
// their layout on return.
PlaceTy {
place: *return_place,
layout: self.layout_of_local(self.frame(), mir::RETURN_PLACE, None)?,
layout: self.layout_of(self.frame().mir.return_ty())?,
},
None => return err!(InvalidNullPointerUsage),
},