]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_codegen_cranelift/src/base.rs
Rollup merge of #100730 - CleanCut:diagnostics-rustc_monomorphize, r=davidtwco
[rust.git] / compiler / rustc_codegen_cranelift / src / base.rs
index 3011813c7035b56ae39bbc80fd1852fbae466154..c412e451a033e9619f2630e5362b5e0c12b4e08c 100644 (file)
@@ -925,8 +925,11 @@ pub(crate) fn codegen_panic_inner<'tcx>(
     args: &[Value],
     span: Span,
 ) {
-    let def_id =
-        fx.tcx.lang_items().require(lang_item).unwrap_or_else(|s| fx.tcx.sess.span_fatal(span, &s));
+    let def_id = fx
+        .tcx
+        .lang_items()
+        .require(lang_item)
+        .unwrap_or_else(|e| fx.tcx.sess.span_fatal(span, e.to_string()));
 
     let instance = Instance::mono(fx.tcx, def_id).polymorphize(fx.tcx);
     let symbol_name = fx.tcx.symbol_name(instance).name;