We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
LangItems::require
1 parent db3faa7 commit 74ab27cCopy full SHA for 74ab27c
src/base.rs
@@ -966,11 +966,7 @@ fn codegen_panic_inner<'tcx>(
966
args: &[Value],
967
span: Span,
968
) {
969
- let def_id = fx
970
- .tcx
971
- .lang_items()
972
- .require(lang_item)
973
- .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));
974
975
let instance = Instance::mono(fx.tcx, def_id).polymorphize(fx.tcx);
976
let symbol_name = fx.tcx.symbol_name(instance).name;
0 commit comments