Skip to content

Commit 4dba5a5

Browse files
authored
Merge pull request #501 from Areredify/binders_iter
remove IntoIterator impl for &Binders
2 parents 1d269d3 + 3dc1d65 commit 4dba5a5

File tree

2 files changed

+1
-17
lines changed

2 files changed

+1
-17
lines changed

chalk-ir/src/lib.rs

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1655,22 +1655,6 @@ where
16551655
}
16561656
}
16571657

1658-
/// Allows iterating over a `&Binders<Vec<T>>`, for instance. Each
1659-
/// element will be a `Binders<&T>`.
1660-
impl<'a, V> IntoIterator for &'a Binders<V>
1661-
where
1662-
V: HasInterner,
1663-
&'a V: IntoIterator,
1664-
<&'a V as IntoIterator>::Item: HasInterner<Interner = V::Interner>,
1665-
{
1666-
type Item = Binders<<&'a V as IntoIterator>::Item>;
1667-
type IntoIter = BindersIntoIterator<&'a V>;
1668-
1669-
fn into_iter(self) -> Self::IntoIter {
1670-
self.map_ref(|r| r).into_iter()
1671-
}
1672-
}
1673-
16741658
/// Allows iterating over a Binders<Vec<T>>, for instance.
16751659
/// Each element will include the same set of parameter bounds.
16761660
impl<V, U> IntoIterator for Binders<V>

chalk-solve/src/clauses/program_clauses.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ impl<I: Interner> ToProgramClauses<I> for OpaqueTyDatum<I> {
168168
));
169169

170170
let substitution = Substitution::from1(interner, alias_placeholder_ty.clone());
171-
for bound in &opaque_ty_bound.bounds {
171+
for bound in opaque_ty_bound.bounds {
172172
// Implemented(!T<..>: Bound).
173173
let bound_with_placeholder_ty = bound.substitute(interner, &substitution);
174174
builder.push_binders(&bound_with_placeholder_ty, |builder, bound| {

0 commit comments

Comments
 (0)