diff options
| author | Michael Goulet <michael@errs.io> | 2024-06-14 14:18:56 -0400 |
|---|---|---|
| committer | Michael Goulet <michael@errs.io> | 2024-06-14 16:50:07 -0400 |
| commit | d5c48ebc71280cb523b23f9be25ef8a66916e75d (patch) | |
| tree | 70b2401f0caa09fa94e08d47121c31d7e5d48529 /compiler/rustc_monomorphize/src | |
| parent | f8e566053207b4ecbcbc7a7d6ded82c43061e3da (diff) | |
| download | rust-d5c48ebc71280cb523b23f9be25ef8a66916e75d.tar.gz rust-d5c48ebc71280cb523b23f9be25ef8a66916e75d.zip | |
Add TyCtxt::is_lang_item
Diffstat (limited to 'compiler/rustc_monomorphize/src')
| -rw-r--r-- | compiler/rustc_monomorphize/src/collector.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_monomorphize/src/collector.rs b/compiler/rustc_monomorphize/src/collector.rs index 61680dbfaf5..43f92f8062d 100644 --- a/compiler/rustc_monomorphize/src/collector.rs +++ b/compiler/rustc_monomorphize/src/collector.rs @@ -945,7 +945,7 @@ fn visit_instance_use<'tcx>( // be lowered in codegen to nothing or a call to panic_nounwind. So if we encounter any // of those intrinsics, we need to include a mono item for panic_nounwind, else we may try to // codegen a call to that function without generating code for the function itself. - let def_id = tcx.lang_items().get(LangItem::PanicNounwind).unwrap(); + let def_id = tcx.require_lang_item(LangItem::PanicNounwind, None); let panic_instance = Instance::mono(tcx, def_id); if should_codegen_locally(tcx, panic_instance) { output.push(create_fn_mono_item(tcx, panic_instance, source)); |
