about summary refs log tree commit diff
path: root/src/librustdoc
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2024-01-18 20:56:20 +0100
committerGitHub <noreply@github.com>2024-01-18 20:56:20 +0100
commitfa52edaa51b0f3651a5f8abf8c2d2bb6d0bf587d (patch)
tree7ce053aef416fa54394ff0d2e2f124e7e33370b6 /src/librustdoc
parentc0da80f41891f38a517978ed4369dba66cb61abf (diff)
parent18e66432c40e8c136b5d0fab27137fdabd579ae0 (diff)
Rollup merge of #119869 - oli-obk:track_errors2, r=matthewjasper
replace `track_errors` usages with bubbling up `ErrorGuaranteed`

more of the same as https://github.com/rust-lang/rust/pull/117449 (removing `track_errors`)
Diffstat (limited to 'src/librustdoc')
-rw-r--r--src/librustdoc/clean/inline.rs4
-rw-r--r--src/librustdoc/clean/types.rs4
-rw-r--r--src/librustdoc/passes/collect_intra_doc_links.rs3
3 files changed, 6 insertions, 5 deletions
diff --git a/src/librustdoc/clean/inline.rs b/src/librustdoc/clean/inline.rs
index 014bcb1a881..aab974ad79e 100644
--- a/src/librustdoc/clean/inline.rs
+++ b/src/librustdoc/clean/inline.rs
@@ -312,7 +312,7 @@ pub(crate) fn build_impls(
     let tcx = cx.tcx;
 
     // for each implementation of an item represented by `did`, build the clean::Item for that impl
-    for &did in tcx.inherent_impls(did).iter() {
+    for &did in tcx.inherent_impls(did).into_iter().flatten() {
         build_impl(cx, did, attrs, ret);
     }
 
@@ -325,7 +325,7 @@ pub(crate) fn build_impls(
     if tcx.has_attr(did, sym::rustc_has_incoherent_inherent_impls) {
         let type_ =
             if tcx.is_trait(did) { SimplifiedType::Trait(did) } else { SimplifiedType::Adt(did) };
-        for &did in tcx.incoherent_impls(type_) {
+        for &did in tcx.incoherent_impls(type_).into_iter().flatten() {
             build_impl(cx, did, attrs, ret);
         }
     }
diff --git a/src/librustdoc/clean/types.rs b/src/librustdoc/clean/types.rs
index 90eb783c7ca..6710193f961 100644
--- a/src/librustdoc/clean/types.rs
+++ b/src/librustdoc/clean/types.rs
@@ -1862,7 +1862,7 @@ impl PrimitiveType {
             .get(self)
             .into_iter()
             .flatten()
-            .flat_map(move |&simp| tcx.incoherent_impls(simp))
+            .flat_map(move |&simp| tcx.incoherent_impls(simp).into_iter().flatten())
             .copied()
     }
 
@@ -1870,7 +1870,7 @@ impl PrimitiveType {
         Self::simplified_types()
             .values()
             .flatten()
-            .flat_map(move |&simp| tcx.incoherent_impls(simp))
+            .flat_map(move |&simp| tcx.incoherent_impls(simp).into_iter().flatten())
             .copied()
     }
 
diff --git a/src/librustdoc/passes/collect_intra_doc_links.rs b/src/librustdoc/passes/collect_intra_doc_links.rs
index dbff33dc1ec..30b3e5c784d 100644
--- a/src/librustdoc/passes/collect_intra_doc_links.rs
+++ b/src/librustdoc/passes/collect_intra_doc_links.rs
@@ -624,7 +624,8 @@ impl<'a, 'tcx> LinkCollector<'a, 'tcx> {
                 // Checks if item_name belongs to `impl SomeItem`
                 let mut assoc_items: Vec<_> = tcx
                     .inherent_impls(did)
-                    .iter()
+                    .into_iter()
+                    .flatten()
                     .flat_map(|&imp| {
                         filter_assoc_items_by_name_and_namespace(
                             tcx,