compiler: Reject impossible reprs during enum layout
This commit is contained in:
parent
68d1fd9427
commit
9f4c9155d4
6 changed files with 121 additions and 4 deletions
|
@ -116,6 +116,11 @@ fn map_error<'tcx>(
|
|||
cx.tcx().dcx().delayed_bug(format!("computed layout of empty union: {ty:?}"));
|
||||
LayoutError::Unknown(ty)
|
||||
}
|
||||
LayoutCalculatorError::ReprConflict => {
|
||||
// packed enums are the only known trigger of this, but others might arise
|
||||
cx.tcx().dcx().delayed_bug(format!("computed impossible repr (packed enum?): {ty:?}"));
|
||||
LayoutError::Unknown(ty)
|
||||
}
|
||||
};
|
||||
error(cx, err)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue