diff options
| author | Scott McMurray <scottmcm@users.noreply.github.com> | 2021-12-06 01:12:59 -0800 |
|---|---|---|
| committer | Scott McMurray <scottmcm@users.noreply.github.com> | 2021-12-06 01:12:59 -0800 |
| commit | 0b90204bc820ceafda004a5e4baf9f323b70d790 (patch) | |
| tree | 42de741eec1e8925e3467d9d065bc03f05659a3e /library/core/src/array | |
| parent | ef7c833c203e3de3785f8cbea3006da6237f730e (diff) | |
| download | rust-0b90204bc820ceafda004a5e4baf9f323b70d790.tar.gz rust-0b90204bc820ceafda004a5e4baf9f323b70d790.zip | |
Add tracking issue; make `empty` const too (unstably)
Diffstat (limited to 'library/core/src/array')
| -rw-r--r-- | library/core/src/array/iter.rs | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/library/core/src/array/iter.rs b/library/core/src/array/iter.rs index 9d4cb9284a5..de3b7685385 100644 --- a/library/core/src/array/iter.rs +++ b/library/core/src/array/iter.rs @@ -141,8 +141,8 @@ impl<T, const N: usize> IntoIter<T, N> { /// let r: IntoIter<_, 40> = next_chunk(&mut (10..16)).unwrap_err(); /// assert_eq!(r.collect::<Vec<_>>(), vec![10, 11, 12, 13, 14, 15]); /// ``` - #[unstable(feature = "array_into_iter_constructors", issue = "88888888")] - #[rustc_const_unstable(feature = "array_into_iter_constructors_const", issue = "88888888")] + #[unstable(feature = "array_into_iter_constructors", issue = "91583")] + #[rustc_const_unstable(feature = "const_array_into_iter_constructors", issue = "91583")] pub const unsafe fn from_raw_parts( buffer: [MaybeUninit<T>; N], initialized: Range<usize>, @@ -202,8 +202,9 @@ impl<T, const N: usize> IntoIter<T, N> { /// assert_eq!(get_bytes(true).collect::<Vec<_>>(), vec![1, 2, 3, 4]); /// assert_eq!(get_bytes(false).collect::<Vec<_>>(), vec![]); /// ``` - #[unstable(feature = "array_into_iter_constructors", issue = "88888888")] - pub fn empty() -> Self { + #[unstable(feature = "array_into_iter_constructors", issue = "91583")] + #[rustc_const_unstable(feature = "const_array_into_iter_constructors", issue = "91583")] + pub const fn empty() -> Self { let buffer = MaybeUninit::uninit_array(); let initialized = 0..0; |
