Skip to content

Commit 55d8146

Browse files
committed
add subst_identity_iter and subst_identity_iter_copied methods on EarlyBinder; use this to simplify some EarlyBinder noise around explicit_item_bounds calls
1 parent 097309c commit 55d8146

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

clippy_utils/src/ty.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,7 @@ pub fn contains_ty_adt_constructor_opaque<'tcx>(cx: &LateContext<'tcx>, ty: Ty<'
9090
return false;
9191
}
9292

93-
for bound in cx.tcx.explicit_item_bounds(def_id).transpose_iter() {
94-
let (predicate, _span) = bound.map_bound(|b| *b).subst_identity();
93+
for (predicate, _span) in cx.tcx.explicit_item_bounds(def_id).subst_identity_iter_copied() {
9594
match predicate.kind().skip_binder() {
9695
// For `impl Trait<U>`, it will register a predicate of `T: Trait<U>`, so we go through
9796
// and check substituions to find `U`.

0 commit comments

Comments
 (0)