diff options
| author | yukang <moorekang@gmail.com> | 2023-08-04 13:28:04 +0800 |
|---|---|---|
| committer | yukang <moorekang@gmail.com> | 2023-08-05 01:38:14 +0800 |
| commit | 46062cd68daa0f08368023c5dc29ec7cefc03370 (patch) | |
| tree | 987677f1ba196b442cf0306d9738da75010fe3b2 | |
| parent | 3cde1943af6ac5d8c260df13b850c2ea61e66c09 (diff) | |
| download | rust-46062cd68daa0f08368023c5dc29ec7cefc03370.tar.gz rust-46062cd68daa0f08368023c5dc29ec7cefc03370.zip | |
Fix ICE failed to get layout for ReferencesError
| -rw-r--r-- | src/context.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/context.rs b/src/context.rs index 08507e19652..88dcafa7370 100644 --- a/src/context.rs +++ b/src/context.rs @@ -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) |
