Remove LangItems::require

It's just a short wrapper used by `tcx.require_lang_item`. Deleting it
gives us a negative diff.
This commit is contained in:
Nilstrieb 2023-05-16 19:23:38 +02:00
parent db3faa78d0
commit 74ab27c269

View File

@ -966,11 +966,7 @@ fn codegen_panic_inner<'tcx>(
args: &[Value], args: &[Value],
span: Span, span: Span,
) { ) {
let def_id = fx let def_id = fx.tcx.require_lang_item(lang_item, Some(span));
.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 instance = Instance::mono(fx.tcx, def_id).polymorphize(fx.tcx);
let symbol_name = fx.tcx.symbol_name(instance).name; let symbol_name = fx.tcx.symbol_name(instance).name;