Skip to content

Commit

Permalink
Rollup merge of rust-lang#114450 - chenyukang:yukang-fix-114435, r=co…
Browse files Browse the repository at this point in the history
…mpiler-errors

Fix ICE failed to get layout for ReferencesError

Fixes rust-lang#114435

r? `@compiler-errors`
  • Loading branch information
matthiaskrgr committed Aug 4, 2023
2 parents 2876bb8 + 80f2b01 commit 88a79c6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,7 @@ impl<'tcx> LayoutOfHelpers<'tcx> for RevealAllLayoutCx<'tcx> {

#[inline]
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())
} else {
span_bug!(span, "failed to get layout for `{}`: {}", ty, err)
Expand Down

0 comments on commit 88a79c6

Please sign in to comment.