Skip to content

Commit 88a79c6

Browse files
authored
Rollup merge of #114450 - chenyukang:yukang-fix-114435, r=compiler-errors
Fix ICE failed to get layout for ReferencesError Fixes #114435 r? `@compiler-errors`
2 parents 2876bb8 + 80f2b01 commit 88a79c6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/common.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -477,7 +477,7 @@ impl<'tcx> LayoutOfHelpers<'tcx> for RevealAllLayoutCx<'tcx> {
477477

478478
#[inline]
479479
fn handle_layout_err(&self, err: LayoutError<'tcx>, span: Span, ty: Ty<'tcx>) -> ! {
480-
if let layout::LayoutError::SizeOverflow(_) = err {
480+
if let LayoutError::SizeOverflow(_) | LayoutError::ReferencesError(_) = err {
481481
self.0.sess.span_fatal(span, err.to_string())
482482
} else {
483483
span_bug!(span, "failed to get layout for `{}`: {}", ty, err)

0 commit comments

Comments
 (0)