Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rollup of 6 pull requests #100525

Merged
merged 26 commits into from
Aug 14, 2022
Merged
Changes from 1 commit
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
01db8b6
Delay a span bug if we see ty/const generic params during writeback
compiler-errors Jul 22, 2022
c9b21b0
orphan check: remove const generics fixme
lcnr Jul 28, 2022
2634309
update comment
lcnr Jul 29, 2022
ca3d101
Add `Iterator::array_chunks()`
rossmacarthur Jan 2, 2022
f548518
Use `array::IntoIter` for the `ArrayChunks` remainder
rossmacarthur Feb 4, 2022
ef72349
Remove `array::IntoIter::with_partial` -- an artifact of the past, on…
WaffleLapkin Aug 1, 2022
b8b1486
Forward `ArrayChunks::next{,_back}` to `try_{for_each,rfold}`
WaffleLapkin Aug 1, 2022
4db628a
Remove incorrect impl `TrustedLen` for `ArrayChunks`
WaffleLapkin Aug 1, 2022
3102b39
Use `#[track_caller]` to make panic in `Iterator::array_chunks` nicer
WaffleLapkin Aug 1, 2022
37dfb04
Remove `Fuse` from `ArrayChunks` implementation
WaffleLapkin Aug 1, 2022
4c0292c
Simplify `ArrayChunks::is_empty`
WaffleLapkin Aug 1, 2022
475e4ba
Simplify `ArrayChunks::{,r}fold` impls
WaffleLapkin Aug 1, 2022
756bd6e
Use `next_chunk` in `ArrayChunks` impl
WaffleLapkin Aug 2, 2022
2af92bb
Suggest removing `let` if `const let` is used
obeis Aug 3, 2022
accb8e3
Suggest removing `let` if `let const` is used
obeis Aug 3, 2022
b3f32d1
Add ui test for #99910
obeis Aug 3, 2022
eb6b729
address review comments
WaffleLapkin Aug 12, 2022
5fbcde1
fill-in tracking issue for `feature(iter_array_chunks)`
WaffleLapkin Aug 12, 2022
8fa707a
rustc_target: Update some old naming around self contained linking
petrochenkov Aug 3, 2022
6b19a48
`assert_{inhabited,zero_valid,uninit_valid}` intrinsics are safe
tmiasko Aug 13, 2022
a9f3e03
Rollup merge of #99582 - compiler-errors:issue-99566, r=cjgillot
Dylan-DPC Aug 14, 2022
92344e3
Rollup merge of #99861 - lcnr:orphan-check-cg, r=jackh726
Dylan-DPC Aug 14, 2022
482a6ea
Rollup merge of #100026 - WaffleLapkin:array-chunks, r=scottmcm
Dylan-DPC Aug 14, 2022
7473484
Rollup merge of #100115 - obeis:issue-99910, r=cjgillot
Dylan-DPC Aug 14, 2022
38bc937
Rollup merge of #100126 - petrochenkov:screname, r=davidtwco
Dylan-DPC Aug 14, 2022
9de9786
Rollup merge of #100487 - tmiasko:assert-safe, r=petrochenkov
Dylan-DPC Aug 14, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fill-in tracking issue for feature(iter_array_chunks)
WaffleLapkin committed Aug 12, 2022
commit 5fbcde1b55c09421f43a7d6cfe09103d064ed2db
12 changes: 6 additions & 6 deletions library/core/src/iter/adapters/array_chunks.rs
Original file line number Diff line number Diff line change
@@ -11,7 +11,7 @@ use crate::ops::{ControlFlow, NeverShortCircuit, Try};
/// method on [`Iterator`]. See its documentation for more.
#[derive(Debug, Clone)]
#[must_use = "iterators are lazy and do nothing unless consumed"]
#[unstable(feature = "iter_array_chunks", reason = "recently added", issue = "none")]
#[unstable(feature = "iter_array_chunks", reason = "recently added", issue = "100450")]
pub struct ArrayChunks<I: Iterator, const N: usize> {
iter: I,
remainder: Option<array::IntoIter<I::Item, N>>,
@@ -30,14 +30,14 @@ where
/// Returns an iterator over the remaining elements of the original iterator
/// that are not going to be returned by this iterator. The returned
/// iterator will yield at most `N-1` elements.
#[unstable(feature = "iter_array_chunks", reason = "recently added", issue = "none")]
#[unstable(feature = "iter_array_chunks", reason = "recently added", issue = "100450")]
#[inline]
pub fn into_remainder(self) -> Option<array::IntoIter<I::Item, N>> {
self.remainder
}
}

#[unstable(feature = "iter_array_chunks", reason = "recently added", issue = "none")]
#[unstable(feature = "iter_array_chunks", reason = "recently added", issue = "100450")]
impl<I, const N: usize> Iterator for ArrayChunks<I, N>
where
I: Iterator,
@@ -91,7 +91,7 @@ where
}
}

#[unstable(feature = "iter_array_chunks", reason = "recently added", issue = "none")]
#[unstable(feature = "iter_array_chunks", reason = "recently added", issue = "100450")]
impl<I, const N: usize> DoubleEndedIterator for ArrayChunks<I, N>
where
I: DoubleEndedIterator + ExactSizeIterator,
@@ -162,10 +162,10 @@ where
}
}

#[unstable(feature = "iter_array_chunks", reason = "recently added", issue = "none")]
#[unstable(feature = "iter_array_chunks", reason = "recently added", issue = "100450")]
impl<I, const N: usize> FusedIterator for ArrayChunks<I, N> where I: FusedIterator {}

#[unstable(feature = "iter_array_chunks", reason = "recently added", issue = "none")]
#[unstable(feature = "iter_array_chunks", reason = "recently added", issue = "100450")]
impl<I, const N: usize> ExactSizeIterator for ArrayChunks<I, N>
where
I: ExactSizeIterator,
2 changes: 1 addition & 1 deletion library/core/src/iter/adapters/mod.rs
Original file line number Diff line number Diff line change
@@ -33,7 +33,7 @@ pub use self::{
scan::Scan, skip::Skip, skip_while::SkipWhile, take::Take, take_while::TakeWhile, zip::Zip,
};

#[unstable(feature = "iter_array_chunks", reason = "recently added", issue = "none")]
#[unstable(feature = "iter_array_chunks", reason = "recently added", issue = "100450")]
pub use self::array_chunks::ArrayChunks;

#[unstable(feature = "std_internals", issue = "none")]
2 changes: 1 addition & 1 deletion library/core/src/iter/mod.rs
Original file line number Diff line number Diff line change
@@ -398,7 +398,7 @@ pub use self::traits::{

#[stable(feature = "iter_zip", since = "1.59.0")]
pub use self::adapters::zip;
#[unstable(feature = "iter_array_chunks", reason = "recently added", issue = "none")]
#[unstable(feature = "iter_array_chunks", reason = "recently added", issue = "100450")]
pub use self::adapters::ArrayChunks;
#[unstable(feature = "std_internals", issue = "none")]
pub use self::adapters::ByRefSized;
2 changes: 1 addition & 1 deletion library/core/src/iter/traits/iterator.rs
Original file line number Diff line number Diff line change
@@ -3351,7 +3351,7 @@ pub trait Iterator {
/// }
/// ```
#[track_caller]
#[unstable(feature = "iter_array_chunks", reason = "recently added", issue = "none")]
#[unstable(feature = "iter_array_chunks", reason = "recently added", issue = "100450")]
fn array_chunks<const N: usize>(self) -> ArrayChunks<Self, N>
where
Self: Sized,