Don't ICE on unnormalized struct tail in layout computation
This commit is contained in:
parent
3b2073f076
commit
dd620aa73a
6 changed files with 65 additions and 12 deletions
|
@ -318,7 +318,13 @@ impl<'tcx> SizeSkeleton<'tcx> {
|
|||
Ok(layout) => {
|
||||
return Ok(SizeSkeleton::Known(layout.size));
|
||||
}
|
||||
Err(err) => err,
|
||||
Err(err @ LayoutError::Unknown(_)) => err,
|
||||
// We can't extract SizeSkeleton info from other layout errors
|
||||
Err(
|
||||
e @ LayoutError::Cycle
|
||||
| e @ LayoutError::SizeOverflow(_)
|
||||
| e @ LayoutError::NormalizationFailure(..),
|
||||
) => return Err(e),
|
||||
};
|
||||
|
||||
match *ty.kind() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue