Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit a784a80

Browse files
committedMay 9, 2019
Auto merge of #60672 - Centril:rollup-fhcx463, r=Centril
Rollup of 5 pull requests Successful merges: - #60601 (Add a `cast` method to raw pointers.) - #60638 (pin: make the to-module link more visible) - #60647 (cleanup: Remove `DefIndexAddressSpace`) - #60656 (Inline some Cursor calls for slices) - #60657 (Stabilize and re-export core::array in std) Failed merges: r? @ghost
2 parents ef01f29 + e40f9a6 commit a784a80

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+275
-409
lines changed
 

‎src/libcore/array.rs

Lines changed: 6 additions & 4 deletions
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/libcore/pin.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ use crate::ops::{Deref, DerefMut, Receiver, CoerceUnsized, DispatchFromDyn};
274274
/// value in place, preventing the value referenced by that pointer from being moved
275275
/// unless it implements [`Unpin`].
276276
///
277-
/// See the [`pin` module] documentation for further explanation on pinning.
277+
/// *See the [`pin` module] documentation for an explanation of pinning.*
278278
///
279279
/// [`Unpin`]: ../../std/marker/trait.Unpin.html
280280
/// [`pin` module]: ../../std/pin/index.html

0 commit comments

Comments
 (0)
Please sign in to comment.