Skip to content

Commit 0b90204

Browse files
committed
Add tracking issue; make empty const too (unstably)
1 parent ef7c833 commit 0b90204

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

library/core/src/array/iter.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -141,8 +141,8 @@ impl<T, const N: usize> IntoIter<T, N> {
141141
/// let r: IntoIter<_, 40> = next_chunk(&mut (10..16)).unwrap_err();
142142
/// assert_eq!(r.collect::<Vec<_>>(), vec![10, 11, 12, 13, 14, 15]);
143143
/// ```
144-
#[unstable(feature = "array_into_iter_constructors", issue = "88888888")]
145-
#[rustc_const_unstable(feature = "array_into_iter_constructors_const", issue = "88888888")]
144+
#[unstable(feature = "array_into_iter_constructors", issue = "91583")]
145+
#[rustc_const_unstable(feature = "const_array_into_iter_constructors", issue = "91583")]
146146
pub const unsafe fn from_raw_parts(
147147
buffer: [MaybeUninit<T>; N],
148148
initialized: Range<usize>,
@@ -202,8 +202,9 @@ impl<T, const N: usize> IntoIter<T, N> {
202202
/// assert_eq!(get_bytes(true).collect::<Vec<_>>(), vec![1, 2, 3, 4]);
203203
/// assert_eq!(get_bytes(false).collect::<Vec<_>>(), vec![]);
204204
/// ```
205-
#[unstable(feature = "array_into_iter_constructors", issue = "88888888")]
206-
pub fn empty() -> Self {
205+
#[unstable(feature = "array_into_iter_constructors", issue = "91583")]
206+
#[rustc_const_unstable(feature = "const_array_into_iter_constructors", issue = "91583")]
207+
pub const fn empty() -> Self {
207208
let buffer = MaybeUninit::uninit_array();
208209
let initialized = 0..0;
209210

library/core/src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@
101101
#![feature(const_align_of_val)]
102102
#![feature(const_alloc_layout)]
103103
#![feature(const_arguments_as_str)]
104+
#![feature(const_array_into_iter_constructors)]
104105
#![feature(const_bigint_helper_methods)]
105106
#![feature(const_caller_location)]
106107
#![feature(const_cell_into_inner)]
@@ -138,6 +139,7 @@
138139
#![feature(const_type_name)]
139140
#![feature(const_default_impls)]
140141
#![feature(duration_consts_float)]
142+
#![feature(maybe_uninit_uninit_array)]
141143
#![feature(ptr_metadata)]
142144
#![feature(slice_ptr_get)]
143145
#![feature(str_internals)]

0 commit comments

Comments
 (0)