about summary refs log tree commit diff
path: root/compiler/rustc_monomorphize/src/collector.rs
diff options
context:
space:
mode:
authorOli Scherer <git-spam-no-reply9815368754983@oli-obk.de>2024-01-12 14:29:54 +0000
committerOli Scherer <git-spam-no-reply9815368754983@oli-obk.de>2024-01-17 10:02:29 +0000
commit557b11187090b0ec749b07858c6ac18f95b7490e (patch)
treea618811536e95ee1362633f7efc1355ea4aeb80c /compiler/rustc_monomorphize/src/collector.rs
parent49347ee12dd23c357d45374a6e442e2c32fa4202 (diff)
downloadrust-557b11187090b0ec749b07858c6ac18f95b7490e.tar.gz
rust-557b11187090b0ec749b07858c6ac18f95b7490e.zip
Make crate_inherent_impls fallible and stop using `track_errors` for it
Diffstat (limited to 'compiler/rustc_monomorphize/src/collector.rs')
-rw-r--r--compiler/rustc_monomorphize/src/collector.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_monomorphize/src/collector.rs b/compiler/rustc_monomorphize/src/collector.rs
index 070580860c1..20e70f87b75 100644
--- a/compiler/rustc_monomorphize/src/collector.rs
+++ b/compiler/rustc_monomorphize/src/collector.rs
@@ -1433,7 +1433,7 @@ fn collect_alloc<'tcx>(tcx: TyCtxt<'tcx>, alloc_id: AllocId, output: &mut MonoIt
 }
 
 fn assoc_fn_of_type<'tcx>(tcx: TyCtxt<'tcx>, def_id: DefId, fn_ident: Ident) -> Option<DefId> {
-    for impl_def_id in tcx.inherent_impls(def_id) {
+    for impl_def_id in tcx.inherent_impls(def_id).ok()? {
         if let Some(new) = tcx.associated_items(impl_def_id).find_by_name_and_kind(
             tcx,
             fn_ident,