diff options
| author | bors <bors@rust-lang.org> | 2021-12-15 03:28:55 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2021-12-15 03:28:55 +0000 |
| commit | 195e931b02b69bbce1bcf4632f4e2d5603ef006b (patch) | |
| tree | f56ab523ec6f2a40e2ed60e80fc27f420bfe24f9 /library | |
| parent | d594910a2da12f158477b4c7281716f535cfa3de (diff) | |
| parent | 22fc403757b4e1bbe91375781b33fe51db8030c2 (diff) | |
| download | rust-195e931b02b69bbce1bcf4632f4e2d5603ef006b.tar.gz rust-195e931b02b69bbce1bcf4632f4e2d5603ef006b.zip | |
Auto merge of #91945 - matthiaskrgr:rollup-jszf9zp, r=matthiaskrgr
Rollup of 7 pull requests Successful merges: - #90939 (Tweak errors coming from `for`-loop, `?` and `.await` desugaring) - #91859 (Iterator::cycle() — document empty iterator special case) - #91868 (Use `OutputFilenames` to generate output file for `-Zllvm-time-trace`) - #91870 (Revert setting a default for the MACOSX_DEPLOYMENT_TARGET env var for linking) - #91881 (Stabilize `iter::zip`) - #91882 (Remove `in_band_lifetimes` from `rustc_typeck`) - #91940 (Update cargo) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'library')
| -rw-r--r-- | library/alloc/src/lib.rs | 1 | ||||
| -rw-r--r-- | library/core/src/iter/adapters/mod.rs | 2 | ||||
| -rw-r--r-- | library/core/src/iter/adapters/zip.rs | 3 | ||||
| -rw-r--r-- | library/core/src/iter/mod.rs | 2 | ||||
| -rw-r--r-- | library/core/src/iter/traits/iterator.rs | 3 | ||||
| -rw-r--r-- | library/core/src/ops/try_trait.rs | 18 | ||||
| -rw-r--r-- | library/std/src/lib.rs | 1 |
7 files changed, 9 insertions, 21 deletions
diff --git a/library/alloc/src/lib.rs b/library/alloc/src/lib.rs index 1bb257acff7..e8a932835f6 100644 --- a/library/alloc/src/lib.rs +++ b/library/alloc/src/lib.rs @@ -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)] diff --git a/library/core/src/iter/adapters/mod.rs b/library/core/src/iter/adapters/mod.rs index 9e1f4e425f9..b1b917775c3 100644 --- a/library/core/src/iter/adapters/mod.rs +++ b/library/core/src/iter/adapters/mod.rs @@ -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 diff --git a/library/core/src/iter/adapters/zip.rs b/library/core/src/iter/adapters/zip.rs index 920fa59c8ad..e1ee0de3d1f 100644 --- a/library/core/src/iter/adapters/zip.rs +++ b/library/core/src/iter/adapters/zip.rs @@ -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, diff --git a/library/core/src/iter/mod.rs b/library/core/src/iter/mod.rs index dc32df4e2b4..da459ed7c68 100644 --- a/library/core/src/iter/mod.rs +++ b/library/core/src/iter/mod.rs @@ -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; diff --git a/library/core/src/iter/traits/iterator.rs b/library/core/src/iter/traits/iterator.rs index 267fa406798..9a9a844f41b 100644 --- a/library/core/src/iter/traits/iterator.rs +++ b/library/core/src/iter/traits/iterator.rs @@ -3028,7 +3028,8 @@ pub trait Iterator { /// /// Instead of stopping at [`None`], the iterator will instead start again, /// from the beginning. After iterating again, it will start at the - /// beginning again. And again. And again. Forever. + /// beginning again. And again. And again. Forever. Note that in case the + /// original iterator is empty, the resulting iterator will also be empty. /// /// # Examples /// diff --git a/library/core/src/ops/try_trait.rs b/library/core/src/ops/try_trait.rs index f4f0a589809..6a414ae8c4b 100644 --- a/library/core/src/ops/try_trait.rs +++ b/library/core/src/ops/try_trait.rs @@ -115,15 +115,14 @@ use crate::ops::ControlFlow; #[unstable(feature = "try_trait_v2", issue = "84277")] #[rustc_on_unimplemented( on( - all(from_method = "from_output", from_desugaring = "TryBlock"), + all(from_desugaring = "TryBlock"), message = "a `try` block must return `Result` or `Option` \ (or another type that implements `{Try}`)", label = "could not wrap the final value of the block as `{Self}` doesn't implement `Try`", ), on( - all(from_method = "branch", from_desugaring = "QuestionMark"), - message = "the `?` operator can only be applied to values \ - that implement `{Try}`", + all(from_desugaring = "QuestionMark"), + message = "the `?` operator can only be applied to values that implement `{Try}`", label = "the `?` operator cannot be applied to type `{Self}`" ) )] @@ -226,7 +225,6 @@ pub trait Try: FromResidual { #[rustc_on_unimplemented( on( all( - from_method = "from_residual", from_desugaring = "QuestionMark", _Self = "std::result::Result<T, E>", R = "std::option::Option<std::convert::Infallible>" @@ -238,7 +236,6 @@ pub trait Try: FromResidual { ), on( all( - from_method = "from_residual", from_desugaring = "QuestionMark", _Self = "std::result::Result<T, E>", ), @@ -252,7 +249,6 @@ pub trait Try: FromResidual { ), on( all( - from_method = "from_residual", from_desugaring = "QuestionMark", _Self = "std::option::Option<T>", R = "std::result::Result<T, E>", @@ -264,7 +260,6 @@ pub trait Try: FromResidual { ), on( all( - from_method = "from_residual", from_desugaring = "QuestionMark", _Self = "std::option::Option<T>", ), @@ -277,7 +272,6 @@ pub trait Try: FromResidual { ), on( all( - from_method = "from_residual", from_desugaring = "QuestionMark", _Self = "std::ops::ControlFlow<B, C>", R = "std::ops::ControlFlow<B, C>", @@ -290,7 +284,6 @@ pub trait Try: FromResidual { ), on( all( - from_method = "from_residual", from_desugaring = "QuestionMark", _Self = "std::ops::ControlFlow<B, C>", // `R` is not a `ControlFlow`, as that case was matched previously @@ -301,10 +294,7 @@ pub trait Try: FromResidual { enclosing_scope = "this function returns a `ControlFlow`", ), on( - all( - from_method = "from_residual", - from_desugaring = "QuestionMark" - ), + all(from_desugaring = "QuestionMark"), message = "the `?` operator can only be used in {ItemContext} \ that returns `Result` or `Option` \ (or another type that implements `{FromResidual}`)", diff --git a/library/std/src/lib.rs b/library/std/src/lib.rs index b5c8c0796ba..22e721d79bf 100644 --- a/library/std/src/lib.rs +++ b/library/std/src/lib.rs @@ -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)] |
