diff options
author | Nilstrieb <48135649+Nilstrieb@users.noreply.github.com> | 2023-05-16 19:23:38 +0200 |
---|---|---|
committer | Nilstrieb <48135649+Nilstrieb@users.noreply.github.com> | 2023-05-16 19:53:38 +0200 |
commit | c3efa51947c3b14652d1e85dd3bb406522c8af22 (patch) | |
tree | 141af3a75d1a95f3f69a43e2b2024fca1d090070 /compiler/rustc_codegen_cranelift | |
parent | cba14074bb4cc12bfe918eabd0d52a3999b2a461 (diff) | |
download | rust-c3efa51947c3b14652d1e85dd3bb406522c8af22.tar.gz |
Remove `LangItems::require`
It's just a short wrapper used by `tcx.require_lang_item`. Deleting it
gives us a negative diff.
Diffstat (limited to 'compiler/rustc_codegen_cranelift')
-rw-r--r-- | compiler/rustc_codegen_cranelift/src/base.rs | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/compiler/rustc_codegen_cranelift/src/base.rs b/compiler/rustc_codegen_cranelift/src/base.rs index e9dbea1be67..25fd5ca3ae8 100644 --- a/compiler/rustc_codegen_cranelift/src/base.rs +++ b/compiler/rustc_codegen_cranelift/src/base.rs @@ -966,11 +966,7 @@ fn codegen_panic_inner<'tcx>( args: &[Value], span: Span, ) { - let def_id = fx - .tcx - .lang_items() - .require(lang_item) - .unwrap_or_else(|e| fx.tcx.sess.span_fatal(span, e.to_string())); + let def_id = fx.tcx.require_lang_item(lang_item, Some(span)); let instance = Instance::mono(fx.tcx, def_id).polymorphize(fx.tcx); let symbol_name = fx.tcx.symbol_name(instance).name; |