about summary refs log tree commit diff
path: root/src/librustdoc
diff options
context:
space:
mode:
authorKyle Matsuda <kyle.yoshio.matsuda@gmail.com>2023-04-17 17:19:08 -0600
committerKyle Matsuda <kyle.yoshio.matsuda@gmail.com>2023-04-20 12:36:50 -0600
commite54854f6a93f4121ac55d895830414d33bd3aa8e (patch)
tree39a6e52cbddc140a69e8bd86ad58c22cdfc9f510 /src/librustdoc
parentf3b279fcc54eea8e4fb094d1672a3907489aa66b (diff)
add subst_identity_iter and subst_identity_iter_copied methods on EarlyBinder; use this to simplify some EarlyBinder noise around explicit_item_bounds calls
Diffstat (limited to 'src/librustdoc')
-rw-r--r--src/librustdoc/clean/mod.rs6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/librustdoc/clean/mod.rs b/src/librustdoc/clean/mod.rs
index 00932c59cca..c992a5388d1 100644
--- a/src/librustdoc/clean/mod.rs
+++ b/src/librustdoc/clean/mod.rs
@@ -1315,10 +1315,8 @@ pub(crate) fn clean_middle_assoc_item<'tcx>(
             }
 
             if let ty::TraitContainer = assoc_item.container {
-                let bounds = tcx
-                    .explicit_item_bounds(assoc_item.def_id)
-                    .transpose_iter()
-                    .map(|bound| bound.map_bound(|b| *b).subst_identity());
+                let bounds =
+                    tcx.explicit_item_bounds(assoc_item.def_id).subst_identity_iter_copied();
                 let predicates = tcx.explicit_predicates_of(assoc_item.def_id).predicates;
                 let predicates =
                     tcx.arena.alloc_from_iter(bounds.chain(predicates.iter().copied()));