diff options
| author | Nathan Stocks <cleancut@github.com> | 2022-08-24 16:52:46 -0600 |
|---|---|---|
| committer | Nathan Stocks <cleancut@github.com> | 2022-08-25 11:06:45 -0600 |
| commit | 6cdfdd02f65da9d11742e15cd3d1176bb2ab3858 (patch) | |
| tree | 7ec4c601855b41f1dd14aabce1c6fb3bf5a9429e /compiler/rustc_codegen_cranelift | |
| parent | 30c750665517756484b0154b1b33a1256e614e6b (diff) | |
| download | rust-6cdfdd02f65da9d11742e15cd3d1176bb2ab3858.tar.gz rust-6cdfdd02f65da9d11742e15cd3d1176bb2ab3858.zip | |
adjust to new error value
Diffstat (limited to 'compiler/rustc_codegen_cranelift')
| -rw-r--r-- | compiler/rustc_codegen_cranelift/src/base.rs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/compiler/rustc_codegen_cranelift/src/base.rs b/compiler/rustc_codegen_cranelift/src/base.rs index 44c34d6c8cb..3a2875e5d27 100644 --- a/compiler/rustc_codegen_cranelift/src/base.rs +++ b/compiler/rustc_codegen_cranelift/src/base.rs @@ -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; |
