mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-23 13:13:34 +00:00
add subst_identity_iter and subst_identity_iter_copied methods on EarlyBinder; use this to simplify some EarlyBinder noise around explicit_item_bounds calls
This commit is contained in:
parent
097309c10f
commit
55d8146334
1 changed files with 1 additions and 2 deletions
|
@ -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`.
|
||||
|
|
Loading…
Reference in a new issue