Skip to content

Commit 84fe598

Browse files
authored
Rollup merge of #88789 - the8472:rm-zip-bound, r=JohnTitor
remove unnecessary bound on Zip specialization impl I originally added this bound in an attempt to make the specialization sound for owning iterators but it was never correct here and the correct and [already implemented](https://github.com/rust-lang/rust/blob/497ee321af3b8496eaccd7af7b437f18bab81abf/library/alloc/src/vec/into_iter.rs#L220-L232) solution is is to place it on the IntoIter implementation.
2 parents 71fcb72 + 4b743bf commit 84fe598

File tree

1 file changed

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

1 file changed

+2
-6
lines changed

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

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

430+
// Since SourceIter forwards the left hand side we do the same here
430431
#[unstable(issue = "none", feature = "inplace_iteration")]
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 {}
432+
unsafe impl<A: InPlaceIterable, B: Iterator> InPlaceIterable for Zip<A, B> {}
437433

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

0 commit comments

Comments
 (0)