about summary refs log tree commit diff
path: root/compiler/rustc_codegen_cranelift/src/common.rs
diff options
context:
space:
mode:
authorKatherine Philip <katherinephilip98@gmail.com>2023-08-28 12:40:39 -0700
committerKatherine Philip <katherinephilip98@gmail.com>2023-08-28 12:40:39 -0700
commit56b767322b87917ea82bad6472593efa839437f9 (patch)
tree2384aaa61bc9870eb6d40456f104beff7f5f7eb0 /compiler/rustc_codegen_cranelift/src/common.rs
parent441086879821d554ecdfde391e767d1a954fd5e2 (diff)
downloadrust-56b767322b87917ea82bad6472593efa839437f9.tar.gz
rust-56b767322b87917ea82bad6472593efa839437f9.zip
Don't ICE on layout computation failure
Diffstat (limited to 'compiler/rustc_codegen_cranelift/src/common.rs')
-rw-r--r--compiler/rustc_codegen_cranelift/src/common.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_codegen_cranelift/src/common.rs b/compiler/rustc_codegen_cranelift/src/common.rs
index 3081dcfa2b7..ec2da39398b 100644
--- a/compiler/rustc_codegen_cranelift/src/common.rs
+++ b/compiler/rustc_codegen_cranelift/src/common.rs
@@ -480,7 +480,7 @@ impl<'tcx> LayoutOfHelpers<'tcx> for RevealAllLayoutCx<'tcx> {
         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)
+            self.0.sess.span_fatal(span, format!("failed to get layout for `{}`: {}", ty, err))
         }
     }
 }