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 | 3d25b5c7e8653a4ce0513cf8d7bcbd796ed81c4b (patch) | |
| tree | 7049bb16423caef78f760045839eba84e032c17b /compiler/rustc_codegen_gcc/src/context.rs | |
| parent | 60fa393490ef88c79da2a58569795236b4d4c9db (diff) | |
| download | rust-3d25b5c7e8653a4ce0513cf8d7bcbd796ed81c4b.tar.gz rust-3d25b5c7e8653a4ce0513cf8d7bcbd796ed81c4b.zip | |
Fix ICE failed to get layout for ReferencesError
Diffstat (limited to 'compiler/rustc_codegen_gcc/src/context.rs')
| -rw-r--r-- | compiler/rustc_codegen_gcc/src/context.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_codegen_gcc/src/context.rs b/compiler/rustc_codegen_gcc/src/context.rs index 08507e19652..88dcafa7370 100644 --- a/compiler/rustc_codegen_gcc/src/context.rs +++ b/compiler/rustc_codegen_gcc/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) |
