Skip to content

Commit 028e78d

Browse files
committed
Stabilize and re-export core::array
1 parent 3f5152e commit 028e78d

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

src/libcore/array.rs

+6-4
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,7 @@
44
//!
55
//! *[See also the array primitive type](../../std/primitive.array.html).*
66
7-
#![unstable(feature = "fixed_size_array",
8-
reason = "traits and impls are better expressed through generic \
9-
integer constants",
10-
issue = "27778")]
7+
#![stable(feature = "core_array", since = "1.36.0")]
118

129
use crate::borrow::{Borrow, BorrowMut};
1310
use crate::cmp::Ordering;
@@ -30,13 +27,17 @@ use crate::slice::{Iter, IterMut};
3027
/// Note that the traits AsRef and AsMut provide similar methods for types that
3128
/// may not be fixed-size arrays. Implementors should prefer those traits
3229
/// instead.
30+
#[unstable(feature = "fixed_size_array", issue = "27778")]
3331
pub unsafe trait FixedSizeArray<T> {
3432
/// Converts the array to immutable slice
33+
#[unstable(feature = "fixed_size_array", issue = "27778")]
3534
fn as_slice(&self) -> &[T];
3635
/// Converts the array to mutable slice
36+
#[unstable(feature = "fixed_size_array", issue = "27778")]
3737
fn as_mut_slice(&mut self) -> &mut [T];
3838
}
3939

40+
#[unstable(feature = "fixed_size_array", issue = "27778")]
4041
unsafe impl<T, A: Unsize<[T]>> FixedSizeArray<T> for A {
4142
#[inline]
4243
fn as_slice(&self) -> &[T] {
@@ -53,6 +54,7 @@ unsafe impl<T, A: Unsize<[T]>> FixedSizeArray<T> for A {
5354
#[derive(Debug, Copy, Clone)]
5455
pub struct TryFromSliceError(());
5556

57+
#[stable(feature = "core_array", since = "1.36.0")]
5658
impl fmt::Display for TryFromSliceError {
5759
#[inline]
5860
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {

src/libstd/lib.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,6 @@
259259
#![feature(exact_size_is_empty)]
260260
#![feature(exhaustive_patterns)]
261261
#![feature(external_doc)]
262-
#![feature(fixed_size_array)]
263262
#![feature(fn_traits)]
264263
#![feature(fnbox)]
265264
#![feature(generator_trait)]
@@ -435,6 +434,8 @@ pub use core::char;
435434
pub use core::u128;
436435
#[stable(feature = "core_hint", since = "1.27.0")]
437436
pub use core::hint;
437+
#[stable(feature = "core_array", since = "1.36.0")]
438+
pub use core::array;
438439

439440
pub mod f32;
440441
pub mod f64;

0 commit comments

Comments
 (0)