Skip to content

Commit

Permalink
Revert "Rollup merge of rust-lang#88789 - the8472:rm-zip-bound, r=Joh…
Browse files Browse the repository at this point in the history
…nTitor"

This reverts commit 84fe598, reversing
changes made to 71fcb72.
  • Loading branch information
JohnTitor committed Oct 28, 2021
1 parent f2707fe commit 63b4faa
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions library/core/src/iter/adapters/zip.rs
Original file line number Diff line number Diff line change
Expand Up @@ -427,9 +427,13 @@ where
}
}

// Since SourceIter forwards the left hand side we do the same here
#[unstable(issue = "none", feature = "inplace_iteration")]
unsafe impl<A: InPlaceIterable, B: Iterator> InPlaceIterable for Zip<A, B> {}
// Limited to Item: Copy since interaction between Zip's use of TrustedRandomAccess
// and Drop implementation of the source is unclear.
//
// An additional method returning the number of times the source has been logically advanced
// (without calling next()) would be needed to properly drop the remainder of the source.
unsafe impl<A: InPlaceIterable, B: Iterator> InPlaceIterable for Zip<A, B> where A::Item: Copy {}

#[stable(feature = "rust1", since = "1.0.0")]
impl<A: Debug, B: Debug> Debug for Zip<A, B> {
Expand Down

0 comments on commit 63b4faa

Please sign in to comment.