Skip to content

Commit 92210e7

Browse files
committed
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
2 parents 5f5f9e1 + d467e39 commit 92210e7

File tree

7 files changed

+9
-21
lines changed

7 files changed

+9
-21
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;

core/src/iter/traits/iterator.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3028,7 +3028,8 @@ pub trait Iterator {
30283028
///
30293029
/// Instead of stopping at [`None`], the iterator will instead start again,
30303030
/// from the beginning. After iterating again, it will start at the
3031-
/// beginning again. And again. And again. Forever.
3031+
/// beginning again. And again. And again. Forever. Note that in case the
3032+
/// original iterator is empty, the resulting iterator will also be empty.
30323033
///
30333034
/// # Examples
30343035
///

core/src/ops/try_trait.rs

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -115,15 +115,14 @@ use crate::ops::ControlFlow;
115115
#[unstable(feature = "try_trait_v2", issue = "84277")]
116116
#[rustc_on_unimplemented(
117117
on(
118-
all(from_method = "from_output", from_desugaring = "TryBlock"),
118+
all(from_desugaring = "TryBlock"),
119119
message = "a `try` block must return `Result` or `Option` \
120120
(or another type that implements `{Try}`)",
121121
label = "could not wrap the final value of the block as `{Self}` doesn't implement `Try`",
122122
),
123123
on(
124-
all(from_method = "branch", from_desugaring = "QuestionMark"),
125-
message = "the `?` operator can only be applied to values \
126-
that implement `{Try}`",
124+
all(from_desugaring = "QuestionMark"),
125+
message = "the `?` operator can only be applied to values that implement `{Try}`",
127126
label = "the `?` operator cannot be applied to type `{Self}`"
128127
)
129128
)]
@@ -226,7 +225,6 @@ pub trait Try: FromResidual {
226225
#[rustc_on_unimplemented(
227226
on(
228227
all(
229-
from_method = "from_residual",
230228
from_desugaring = "QuestionMark",
231229
_Self = "std::result::Result<T, E>",
232230
R = "std::option::Option<std::convert::Infallible>"
@@ -238,7 +236,6 @@ pub trait Try: FromResidual {
238236
),
239237
on(
240238
all(
241-
from_method = "from_residual",
242239
from_desugaring = "QuestionMark",
243240
_Self = "std::result::Result<T, E>",
244241
),
@@ -252,7 +249,6 @@ pub trait Try: FromResidual {
252249
),
253250
on(
254251
all(
255-
from_method = "from_residual",
256252
from_desugaring = "QuestionMark",
257253
_Self = "std::option::Option<T>",
258254
R = "std::result::Result<T, E>",
@@ -264,7 +260,6 @@ pub trait Try: FromResidual {
264260
),
265261
on(
266262
all(
267-
from_method = "from_residual",
268263
from_desugaring = "QuestionMark",
269264
_Self = "std::option::Option<T>",
270265
),
@@ -277,7 +272,6 @@ pub trait Try: FromResidual {
277272
),
278273
on(
279274
all(
280-
from_method = "from_residual",
281275
from_desugaring = "QuestionMark",
282276
_Self = "std::ops::ControlFlow<B, C>",
283277
R = "std::ops::ControlFlow<B, C>",
@@ -290,7 +284,6 @@ pub trait Try: FromResidual {
290284
),
291285
on(
292286
all(
293-
from_method = "from_residual",
294287
from_desugaring = "QuestionMark",
295288
_Self = "std::ops::ControlFlow<B, C>",
296289
// `R` is not a `ControlFlow`, as that case was matched previously
@@ -301,10 +294,7 @@ pub trait Try: FromResidual {
301294
enclosing_scope = "this function returns a `ControlFlow`",
302295
),
303296
on(
304-
all(
305-
from_method = "from_residual",
306-
from_desugaring = "QuestionMark"
307-
),
297+
all(from_desugaring = "QuestionMark"),
308298
message = "the `?` operator can only be used in {ItemContext} \
309299
that returns `Result` or `Option` \
310300
(or another type that implements `{FromResidual}`)",

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)