diff options
| author | Yuki Okushi <jtitor@2k36.org> | 2021-10-20 04:35:13 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-10-20 04:35:13 +0900 |
| commit | 84fe598f0094c8d6a1dddcdc38ac0fa28df32f44 (patch) | |
| tree | e9a20212fd82c767472d466f4490895c93e6e7d5 | |
| parent | 71fcb72307e2bb9512d291d33f2adace2406e65a (diff) | |
| parent | 4b743bfef0c0cc20df47b7ae04c162a20f1a70d7 (diff) | |
| download | rust-84fe598f0094c8d6a1dddcdc38ac0fa28df32f44.tar.gz rust-84fe598f0094c8d6a1dddcdc38ac0fa28df32f44.zip | |
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.
| -rw-r--r-- | library/core/src/iter/adapters/zip.rs | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/library/core/src/iter/adapters/zip.rs b/library/core/src/iter/adapters/zip.rs index 2b7287a4133..4b89bc36326 100644 --- a/library/core/src/iter/adapters/zip.rs +++ b/library/core/src/iter/adapters/zip.rs @@ -427,13 +427,9 @@ where } } +// Since SourceIter forwards the left hand side we do the same here #[unstable(issue = "none", feature = "inplace_iteration")] -// 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 {} +unsafe impl<A: InPlaceIterable, B: Iterator> InPlaceIterable for Zip<A, B> {} #[stable(feature = "rust1", since = "1.0.0")] impl<A: Debug, B: Debug> Debug for Zip<A, B> { |
