Rollup merge of #91881 - Patrick-Poitras:stabilize-iter-zip, r=scottmcm

Stabilize `iter::zip`

Hello all!

As the tracking issue (#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 (#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).
This commit is contained in:
Matthias Krüger 2021-12-15 01:28:08 +01:00 committed by GitHub
commit 4e7497bda0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
29 changed files with 3 additions and 30 deletions

View file

@ -33,7 +33,6 @@
#![doc(html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/")]
#![no_std]
#![forbid(unsafe_code)]
#![feature(iter_zip)]
#![feature(nll)]
#[macro_use]

View file

@ -11,7 +11,6 @@
#![feature(box_patterns)]
#![feature(crate_visibility_modifier)]
#![feature(if_let_guard)]
#![feature(iter_zip)]
#![feature(label_break_value)]
#![feature(nll)]
#![feature(min_specialization)]

View file

@ -32,7 +32,6 @@
#![feature(crate_visibility_modifier)]
#![feature(box_patterns)]
#![feature(iter_zip)]
#![feature(never_type)]
#![recursion_limit = "256"]

View file

@ -4,7 +4,6 @@
#![feature(box_patterns)]
#![feature(crate_visibility_modifier)]
#![feature(in_band_lifetimes)]
#![feature(iter_zip)]
#![feature(let_else)]
#![feature(min_specialization)]
#![feature(stmt_expr_attributes)]

View file

@ -6,7 +6,6 @@
#![feature(bool_to_option)]
#![feature(crate_visibility_modifier)]
#![feature(decl_macro)]
#![feature(iter_zip)]
#![feature(nll)]
#![feature(proc_macro_internals)]
#![feature(proc_macro_quote)]

View file

@ -9,7 +9,6 @@
#![feature(crate_visibility_modifier)]
#![feature(extern_types)]
#![feature(in_band_lifetimes)]
#![feature(iter_zip)]
#![feature(nll)]
#![recursion_limit = "256"]

View file

@ -11,7 +11,6 @@ Rust MIR: a lowered representation of Rust.
#![feature(crate_visibility_modifier)]
#![feature(decl_macro)]
#![feature(exact_size_is_empty)]
#![feature(iter_zip)]
#![feature(let_else)]
#![feature(map_try_insert)]
#![feature(min_specialization)]

View file

@ -6,7 +6,6 @@
#![feature(crate_visibility_modifier)]
#![feature(backtrace)]
#![feature(if_let_guard)]
#![feature(iter_zip)]
#![feature(let_else)]
#![feature(nll)]

View file

@ -2,7 +2,6 @@
#![feature(decl_macro)]
#![feature(destructuring_assignment)]
#![feature(if_let_guard)]
#![feature(iter_zip)]
#![feature(let_else)]
#![feature(proc_macro_diagnostic)]
#![feature(proc_macro_internals)]

View file

@ -1,7 +1,6 @@
#![feature(allow_internal_unstable)]
#![feature(bench_black_box)]
#![feature(extend_one)]
#![feature(iter_zip)]
#![feature(min_specialization)]
#![feature(step_trait)]
#![feature(test)]

View file

@ -17,7 +17,6 @@
#![feature(box_patterns)]
#![feature(derive_default_enum)]
#![feature(extend_one)]
#![feature(iter_zip)]
#![feature(let_else)]
#![feature(never_type)]
#![feature(in_band_lifetimes)]

View file

@ -31,7 +31,6 @@
#![feature(box_patterns)]
#![feature(crate_visibility_modifier)]
#![feature(iter_order_by)]
#![feature(iter_zip)]
#![feature(let_else)]
#![feature(never_type)]
#![feature(nll)]

View file

@ -51,7 +51,6 @@
#![feature(half_open_range_patterns)]
#![feature(control_flow_enum)]
#![feature(associated_type_defaults)]
#![feature(iter_zip)]
#![feature(trusted_step)]
#![feature(try_blocks)]
#![feature(try_reserve_kind)]

View file

@ -5,7 +5,6 @@
#![feature(control_flow_enum)]
#![feature(crate_visibility_modifier)]
#![feature(bool_to_option)]
#![feature(iter_zip)]
#![feature(let_else)]
#![feature(once_cell)]
#![feature(min_specialization)]

View file

@ -4,7 +4,6 @@
#![feature(box_syntax)]
#![feature(exact_size_is_empty)]
#![feature(in_band_lifetimes)]
#![feature(iter_zip)]
#![feature(let_else)]
#![feature(min_specialization)]
#![feature(once_cell)]

View file

@ -1,7 +1,6 @@
#![feature(box_patterns)]
#![feature(box_syntax)]
#![feature(crate_visibility_modifier)]
#![feature(iter_zip)]
#![feature(let_else)]
#![feature(map_try_insert)]
#![feature(min_specialization)]

View file

@ -7,7 +7,6 @@
#![doc(html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/")]
#![feature(crate_visibility_modifier)]
#![feature(in_band_lifetimes)]
#![feature(iter_zip)]
#![feature(map_try_insert)]
#![feature(min_specialization)]
#![feature(nll)]

View file

@ -2,7 +2,6 @@
#![feature(bool_to_option)]
#![feature(core_intrinsics)]
#![feature(hash_raw_entry)]
#![feature(iter_zip)]
#![feature(let_else)]
#![feature(min_specialization)]
#![feature(extern_types)]

View file

@ -13,7 +13,6 @@
#![feature(drain_filter)]
#![feature(bool_to_option)]
#![feature(crate_visibility_modifier)]
#![feature(iter_zip)]
#![feature(let_else)]
#![feature(never_type)]
#![feature(nll)]

View file

@ -91,7 +91,6 @@
#![feature(never_type)]
#![feature(nll)]
#![feature(in_band_lifetimes)]
#![feature(iter_zip)]
#![recursion_limit = "256"]
#[macro_use]

View file

@ -17,7 +17,6 @@
#![feature(derive_default_enum)]
#![feature(hash_drain_filter)]
#![feature(in_band_lifetimes)]
#![feature(iter_zip)]
#![feature(let_else)]
#![feature(never_type)]
#![feature(crate_visibility_modifier)]

View file

@ -61,7 +61,6 @@ This API is completely unstable and subject to change.
#![feature(if_let_guard)]
#![feature(in_band_lifetimes)]
#![feature(is_sorted)]
#![feature(iter_zip)]
#![feature(let_else)]
#![feature(min_specialization)]
#![feature(nll)]

View file

@ -107,7 +107,6 @@
#![feature(inherent_ascii_escape)]
#![feature(inplace_iteration)]
#![feature(iter_advance_by)]
#![feature(iter_zip)]
#![feature(layout_for_ptr)]
#![feature(maybe_uninit_extra)]
#![feature(maybe_uninit_slice)]

View file

@ -54,7 +54,7 @@ pub use self::zip::TrustedRandomAccess;
#[unstable(feature = "trusted_random_access", issue = "none")]
pub use self::zip::TrustedRandomAccessNoCoerce;
#[unstable(feature = "iter_zip", issue = "83574")]
#[stable(feature = "iter_zip", since = "1.59.0")]
pub use self::zip::zip;
/// This trait provides transitive access to source-stage in an iterator-adapter pipeline

View file

@ -40,7 +40,6 @@ impl<A: Iterator, B: Iterator> Zip<A, B> {
/// # Examples
///
/// ```
/// #![feature(iter_zip)]
/// use std::iter::zip;
///
/// let xs = [1, 2, 3];
@ -63,7 +62,7 @@ impl<A: Iterator, B: Iterator> Zip<A, B> {
/// assert_eq!(iter.next().unwrap(), ((3, 6), 9));
/// assert!(iter.next().is_none());
/// ```
#[unstable(feature = "iter_zip", issue = "83574")]
#[stable(feature = "iter_zip", since = "1.59.0")]
pub fn zip<A, B>(a: A, b: B) -> Zip<A::IntoIter, B::IntoIter>
where
A: IntoIterator,

View file

@ -391,7 +391,7 @@ pub use self::traits::{
DoubleEndedIterator, ExactSizeIterator, Extend, FromIterator, IntoIterator, Product, Sum,
};
#[unstable(feature = "iter_zip", issue = "83574")]
#[stable(feature = "iter_zip", since = "1.59.0")]
pub use self::adapters::zip;
#[stable(feature = "iter_cloned", since = "1.1.0")]
pub use self::adapters::Cloned;

View file

@ -292,7 +292,6 @@
#![feature(int_log)]
#![feature(into_future)]
#![feature(intra_doc_pointers)]
#![feature(iter_zip)]
#![feature(lang_items)]
#![feature(linkage)]
#![feature(llvm_asm)]

View file

@ -3,7 +3,6 @@
#![feature(box_patterns)]
#![feature(drain_filter)]
#![feature(in_band_lifetimes)]
#![feature(iter_zip)]
#![feature(once_cell)]
#![feature(rustc_private)]
#![feature(stmt_expr_attributes)]

View file

@ -1,6 +1,5 @@
#![feature(box_patterns)]
#![feature(in_band_lifetimes)]
#![feature(iter_zip)]
#![feature(let_else)]
#![feature(rustc_private)]
#![feature(control_flow_enum)]