about summary refs log tree commit diff
path: root/compiler/rustc_trait_selection/src
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 /compiler/rustc_trait_selection/src
parentf3b279fcc54eea8e4fb094d1672a3907489aa66b (diff)
downloadrust-e54854f6a93f4121ac55d895830414d33bd3aa8e.tar.gz
rust-e54854f6a93f4121ac55d895830414d33bd3aa8e.zip
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 'compiler/rustc_trait_selection/src')
-rw-r--r--compiler/rustc_trait_selection/src/traits/object_safety.rs3
1 files changed, 1 insertions, 2 deletions
diff --git a/compiler/rustc_trait_selection/src/traits/object_safety.rs b/compiler/rustc_trait_selection/src/traits/object_safety.rs
index c09658cd4e1..73e2efc3b00 100644
--- a/compiler/rustc_trait_selection/src/traits/object_safety.rs
+++ b/compiler/rustc_trait_selection/src/traits/object_safety.rs
@@ -297,8 +297,7 @@ fn bounds_reference_self(tcx: TyCtxt<'_>, trait_def_id: DefId) -> SmallVec<[Span
     tcx.associated_items(trait_def_id)
         .in_definition_order()
         .filter(|item| item.kind == ty::AssocKind::Type)
-        .flat_map(|item| tcx.explicit_item_bounds(item.def_id).transpose_iter())
-        .map(|bound| bound.map_bound(|b| *b).subst_identity())
+        .flat_map(|item| tcx.explicit_item_bounds(item.def_id).subst_identity_iter_copied())
         .filter_map(|pred_span| predicate_references_self(tcx, pred_span))
         .collect()
 }