about summary refs log tree commit diff
path: root/clippy_utils/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
commit55d814633423c801034fca46f4f391d0c5fd3899 (patch)
tree3ce21638fc3d63f96ddf46e79816bdcbdf1a39fc /clippy_utils/src
parent097309c10f6bdfa0f8540d063e6e64942fd53204 (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 'clippy_utils/src')
-rw-r--r--clippy_utils/src/ty.rs3
1 files changed, 1 insertions, 2 deletions
diff --git a/clippy_utils/src/ty.rs b/clippy_utils/src/ty.rs
index 5f768928adf..cb700126c2b 100644
--- a/clippy_utils/src/ty.rs
+++ b/clippy_utils/src/ty.rs
@@ -90,8 +90,7 @@ pub fn contains_ty_adt_constructor_opaque<'tcx>(cx: &LateContext<'tcx>, ty: Ty<'
                         return false;
                     }
 
-                    for bound in cx.tcx.explicit_item_bounds(def_id).transpose_iter() {
-                        let (predicate, _span) = bound.map_bound(|b| *b).subst_identity();
+                    for (predicate, _span) in cx.tcx.explicit_item_bounds(def_id).subst_identity_iter_copied() {
                         match predicate.kind().skip_binder() {
                             // For `impl Trait<U>`, it will register a predicate of `T: Trait<U>`, so we go through
                             // and check substituions to find `U`.