From 3dc1d65ee2e9248b98e0edf3d7bc9476788540a2 Mon Sep 17 00:00:00 2001 From: Mikhail Babenko Date: Tue, 9 Jun 2020 02:35:45 +0300 Subject: [PATCH] remove IntoIterator impl for &Binders --- chalk-ir/src/lib.rs | 16 ---------------- chalk-solve/src/clauses/program_clauses.rs | 2 +- 2 files changed, 1 insertion(+), 17 deletions(-) diff --git a/chalk-ir/src/lib.rs b/chalk-ir/src/lib.rs index 8e0ff8b23f2..890b9f0b592 100644 --- a/chalk-ir/src/lib.rs +++ b/chalk-ir/src/lib.rs @@ -1655,22 +1655,6 @@ where } } -/// Allows iterating over a `&Binders>`, for instance. Each -/// element will be a `Binders<&T>`. -impl<'a, V> IntoIterator for &'a Binders -where - V: HasInterner, - &'a V: IntoIterator, - <&'a V as IntoIterator>::Item: HasInterner, -{ - type Item = Binders<<&'a V as IntoIterator>::Item>; - type IntoIter = BindersIntoIterator<&'a V>; - - fn into_iter(self) -> Self::IntoIter { - self.map_ref(|r| r).into_iter() - } -} - /// Allows iterating over a Binders>, for instance. /// Each element will include the same set of parameter bounds. impl IntoIterator for Binders diff --git a/chalk-solve/src/clauses/program_clauses.rs b/chalk-solve/src/clauses/program_clauses.rs index 800f3a8fc94..ed6f81d8327 100644 --- a/chalk-solve/src/clauses/program_clauses.rs +++ b/chalk-solve/src/clauses/program_clauses.rs @@ -168,7 +168,7 @@ impl ToProgramClauses for OpaqueTyDatum { )); let substitution = Substitution::from1(interner, alias_placeholder_ty.clone()); - for bound in &opaque_ty_bound.bounds { + for bound in opaque_ty_bound.bounds { // Implemented(!T<..>: Bound). let bound_with_placeholder_ty = bound.substitute(interner, &substitution); builder.push_binders(&bound_with_placeholder_ty, |builder, bound| {