Skip to content

Commit 63b4faa

Browse files
committed
Revert "Rollup merge of #88789 - the8472:rm-zip-bound, r=JohnTitor"
This reverts commit 84fe598, reversing changes made to 71fcb72.
1 parent f2707fe commit 63b4faa

File tree

1 file changed

+6
-2
lines changed
  • library/core/src/iter/adapters

1 file changed

+6
-2
lines changed

library/core/src/iter/adapters/zip.rs

+6-2
Original file line numberDiff line numberDiff line change
@@ -427,9 +427,13 @@ where
427427
}
428428
}
429429

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

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

0 commit comments

Comments
 (0)