about summary refs log tree commit diff
path: root/compiler/rustc_lint/src
diff options
context:
space:
mode:
authorMichael Goulet <michael@errs.io>2024-07-06 11:54:22 -0400
committerMichael Goulet <michael@errs.io>2024-07-07 00:12:35 -0400
commit58aad3c72c32936b49f92f552e0157b9c8c862ee (patch)
treef5f7e8da4f7fd586a1fbbd6560e2d82476c779f9 /compiler/rustc_lint/src
parent289deb9ed78af2a042b0a326003162c4b770b121 (diff)
downloadrust-58aad3c72c32936b49f92f552e0157b9c8c862ee.tar.gz
rust-58aad3c72c32936b49f92f552e0157b9c8c862ee.zip
iter_identity is a better name
Diffstat (limited to 'compiler/rustc_lint/src')
-rw-r--r--compiler/rustc_lint/src/opaque_hidden_inferred_bound.rs4
-rw-r--r--compiler/rustc_lint/src/unused.rs4
2 files changed, 2 insertions, 6 deletions
diff --git a/compiler/rustc_lint/src/opaque_hidden_inferred_bound.rs b/compiler/rustc_lint/src/opaque_hidden_inferred_bound.rs
index 8b669bcc13f..5ee73dbfdc6 100644
--- a/compiler/rustc_lint/src/opaque_hidden_inferred_bound.rs
+++ b/compiler/rustc_lint/src/opaque_hidden_inferred_bound.rs
@@ -76,9 +76,7 @@ impl<'tcx> LateLintPass<'tcx> for OpaqueHiddenInferredBound {
         // For every projection predicate in the opaque type's explicit bounds,
         // check that the type that we're assigning actually satisfies the bounds
         // of the associated type.
-        for (pred, pred_span) in
-            cx.tcx.explicit_item_bounds(def_id).instantiate_identity_iter_copied()
-        {
+        for (pred, pred_span) in cx.tcx.explicit_item_bounds(def_id).iter_identity_copied() {
             infcx.enter_forall(pred.kind(), |predicate| {
                 let ty::ClauseKind::Projection(proj) = predicate else {
                     return;
diff --git a/compiler/rustc_lint/src/unused.rs b/compiler/rustc_lint/src/unused.rs
index 195a0f72475..65d42ed8054 100644
--- a/compiler/rustc_lint/src/unused.rs
+++ b/compiler/rustc_lint/src/unused.rs
@@ -298,9 +298,7 @@ impl<'tcx> LateLintPass<'tcx> for UnusedResults {
                 ty::Alias(ty::Opaque | ty::Projection, ty::AliasTy { def_id: def, .. }) => {
                     elaborate(
                         cx.tcx,
-                        cx.tcx
-                            .explicit_item_super_predicates(def)
-                            .instantiate_identity_iter_copied(),
+                        cx.tcx.explicit_item_super_predicates(def).iter_identity_copied(),
                     )
                     // We only care about self bounds for the impl-trait
                     .filter_only_self()