@@ -1744,8 +1744,9 @@ impl<T> [T] {
1744
1744
/// maintained.
1745
1745
///
1746
1746
/// This method splits the slice into three distinct slices: prefix, correctly aligned middle
1747
- /// slice of a new type, and the suffix slice. The middle slice will have the greatest length
1748
- /// possible for a given type and input slice.
1747
+ /// slice of a new type, and the suffix slice. The method does a best effort to make the
1748
+ /// middle slice the greatest length possible for a given type and input slice, but only
1749
+ /// your algorithm's performance should depend on that, not its correctness.
1749
1750
///
1750
1751
/// This method has no purpose when either input element `T` or output element `U` are
1751
1752
/// zero-sized and will return the original slice without splitting anything.
@@ -1760,7 +1761,6 @@ impl<T> [T] {
1760
1761
/// Basic usage:
1761
1762
///
1762
1763
/// ```
1763
- /// # #![feature(slice_align_to)]
1764
1764
/// unsafe {
1765
1765
/// let bytes: [u8; 7] = [1, 2, 3, 4, 5, 6, 7];
1766
1766
/// let (prefix, shorts, suffix) = bytes.align_to::<u16>();
@@ -1769,7 +1769,7 @@ impl<T> [T] {
1769
1769
/// // less_efficient_algorithm_for_bytes(suffix);
1770
1770
/// }
1771
1771
/// ```
1772
- #[ unstable ( feature = "slice_align_to" , issue = "44488 " ) ]
1772
+ #[ stable ( feature = "slice_align_to" , since = "1.30.0 " ) ]
1773
1773
pub unsafe fn align_to < U > ( & self ) -> ( & [ T ] , & [ U ] , & [ T ] ) {
1774
1774
// Note that most of this function will be constant-evaluated,
1775
1775
if :: mem:: size_of :: < U > ( ) == 0 || :: mem:: size_of :: < T > ( ) == 0 {
@@ -1797,8 +1797,9 @@ impl<T> [T] {
1797
1797
/// maintained.
1798
1798
///
1799
1799
/// This method splits the slice into three distinct slices: prefix, correctly aligned middle
1800
- /// slice of a new type, and the suffix slice. The middle slice will have the greatest length
1801
- /// possible for a given type and input slice.
1800
+ /// slice of a new type, and the suffix slice. The method does a best effort to make the
1801
+ /// middle slice the greatest length possible for a given type and input slice, but only
1802
+ /// your algorithm's performance should depend on that, not its correctness.
1802
1803
///
1803
1804
/// This method has no purpose when either input element `T` or output element `U` are
1804
1805
/// zero-sized and will return the original slice without splitting anything.
@@ -1813,7 +1814,6 @@ impl<T> [T] {
1813
1814
/// Basic usage:
1814
1815
///
1815
1816
/// ```
1816
- /// # #![feature(slice_align_to)]
1817
1817
/// unsafe {
1818
1818
/// let mut bytes: [u8; 7] = [1, 2, 3, 4, 5, 6, 7];
1819
1819
/// let (prefix, shorts, suffix) = bytes.align_to_mut::<u16>();
@@ -1822,7 +1822,7 @@ impl<T> [T] {
1822
1822
/// // less_efficient_algorithm_for_bytes(suffix);
1823
1823
/// }
1824
1824
/// ```
1825
- #[ unstable ( feature = "slice_align_to" , issue = "44488 " ) ]
1825
+ #[ stable ( feature = "slice_align_to" , since = "1.30.0 " ) ]
1826
1826
pub unsafe fn align_to_mut < U > ( & mut self ) -> ( & mut [ T ] , & mut [ U ] , & mut [ T ] ) {
1827
1827
// Note that most of this function will be constant-evaluated,
1828
1828
if :: mem:: size_of :: < U > ( ) == 0 || :: mem:: size_of :: < T > ( ) == 0 {
0 commit comments