Skip to content

Commit d467e39

Browse files
authored
Rollup merge of rust-lang#91881 - Patrick-Poitras:stabilize-iter-zip, r=scottmcm
Stabilize `iter::zip` Hello all! As the tracking issue (rust-lang#83574) for `iter::zip` completed the final commenting period without any concerns being raised, I hereby submit this stabilization PR on the issue. As the pull request that introduced the feature (rust-lang#82917) states, the `iter::zip` function is a shorter way to zip two iterators. As it's generally a quality-of-life/ergonomic improvement, it has been integrated into the codebase without any trouble, and has been used in many places across the rust compiler and standard library since March without any issues. For more details, I would refer to `@cuviper's` original PR, or the [function's documentation](https://doc.rust-lang.org/std/iter/fn.zip.html).
2 parents d58d9e5 + a673ce6 commit d467e39

File tree

5 files changed

+3
-6
lines changed

5 files changed

+3
-6
lines changed

alloc/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,6 @@
107107
#![feature(inherent_ascii_escape)]
108108
#![feature(inplace_iteration)]
109109
#![feature(iter_advance_by)]
110-
#![feature(iter_zip)]
111110
#![feature(layout_for_ptr)]
112111
#![feature(maybe_uninit_extra)]
113112
#![feature(maybe_uninit_slice)]

core/src/iter/adapters/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ pub use self::zip::TrustedRandomAccess;
5454
#[unstable(feature = "trusted_random_access", issue = "none")]
5555
pub use self::zip::TrustedRandomAccessNoCoerce;
5656

57-
#[unstable(feature = "iter_zip", issue = "83574")]
57+
#[stable(feature = "iter_zip", since = "1.59.0")]
5858
pub use self::zip::zip;
5959

6060
/// This trait provides transitive access to source-stage in an iterator-adapter pipeline

core/src/iter/adapters/zip.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ impl<A: Iterator, B: Iterator> Zip<A, B> {
4040
/// # Examples
4141
///
4242
/// ```
43-
/// #![feature(iter_zip)]
4443
/// use std::iter::zip;
4544
///
4645
/// let xs = [1, 2, 3];
@@ -63,7 +62,7 @@ impl<A: Iterator, B: Iterator> Zip<A, B> {
6362
/// assert_eq!(iter.next().unwrap(), ((3, 6), 9));
6463
/// assert!(iter.next().is_none());
6564
/// ```
66-
#[unstable(feature = "iter_zip", issue = "83574")]
65+
#[stable(feature = "iter_zip", since = "1.59.0")]
6766
pub fn zip<A, B>(a: A, b: B) -> Zip<A::IntoIter, B::IntoIter>
6867
where
6968
A: IntoIterator,

core/src/iter/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -391,7 +391,7 @@ pub use self::traits::{
391391
DoubleEndedIterator, ExactSizeIterator, Extend, FromIterator, IntoIterator, Product, Sum,
392392
};
393393

394-
#[unstable(feature = "iter_zip", issue = "83574")]
394+
#[stable(feature = "iter_zip", since = "1.59.0")]
395395
pub use self::adapters::zip;
396396
#[stable(feature = "iter_cloned", since = "1.1.0")]
397397
pub use self::adapters::Cloned;

std/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,6 @@
292292
#![feature(int_log)]
293293
#![feature(into_future)]
294294
#![feature(intra_doc_pointers)]
295-
#![feature(iter_zip)]
296295
#![feature(lang_items)]
297296
#![feature(linkage)]
298297
#![feature(llvm_asm)]

0 commit comments

Comments
 (0)