Rollup merge of #114450 - chenyukang:yukang-fix-114435, r=compiler-errors
Fix ICE failed to get layout for ReferencesError Fixes #114435 r? `@compiler-errors`
This commit is contained in:
commit
88a79c6a76
@ -477,7 +477,7 @@ impl<'tcx> LayoutOfHelpers<'tcx> for RevealAllLayoutCx<'tcx> {
|
|||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
fn handle_layout_err(&self, err: LayoutError<'tcx>, span: Span, ty: Ty<'tcx>) -> ! {
|
fn handle_layout_err(&self, err: LayoutError<'tcx>, span: Span, ty: Ty<'tcx>) -> ! {
|
||||||
if let layout::LayoutError::SizeOverflow(_) = err {
|
if let LayoutError::SizeOverflow(_) | LayoutError::ReferencesError(_) = err {
|
||||||
self.0.sess.span_fatal(span, err.to_string())
|
self.0.sess.span_fatal(span, err.to_string())
|
||||||
} else {
|
} else {
|
||||||
span_bug!(span, "failed to get layout for `{}`: {}", ty, err)
|
span_bug!(span, "failed to get layout for `{}`: {}", ty, err)
|
||||||
|
Loading…
Reference in New Issue
Block a user