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 authored Aug 4, 2023
2 parents de69c67 + 46062cd commit 7ebcd4d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,7 @@ impl<'gcc, 'tcx> LayoutOfHelpers<'tcx> for CodegenCx<'gcc, 'tcx> {

#[inline]
fn handle_layout_err(&self, err: LayoutError<'tcx>, span: Span, ty: Ty<'tcx>) -> ! {
if let LayoutError::SizeOverflow(_) = err {
if let LayoutError::SizeOverflow(_) | LayoutError::ReferencesError(_) = err {
self.sess().emit_fatal(respan(span, err.into_diagnostic()))
} else {
span_bug!(span, "failed to get layout for `{}`: {}", ty, err)
Expand Down

0 comments on commit 7ebcd4d

Please sign in to comment.