@@ -1559,7 +1559,7 @@ impl<T> [T] {
1559
1559
///
1560
1560
/// # Examples
1561
1561
///
1562
- /// ```compile_fail
1562
+ /// ```
1563
1563
/// #![feature(slice_split_at_unchecked)]
1564
1564
///
1565
1565
/// let v = [1, 2, 3, 4, 5, 6];
@@ -1584,7 +1584,7 @@ impl<T> [T] {
1584
1584
/// ```
1585
1585
#[ unstable( feature = "slice_split_at_unchecked" , reason = "new API" , issue = "76014" ) ]
1586
1586
#[ inline]
1587
- unsafe fn split_at_unchecked ( & self , mid : usize ) -> ( & [ T ] , & [ T ] ) {
1587
+ pub unsafe fn split_at_unchecked ( & self , mid : usize ) -> ( & [ T ] , & [ T ] ) {
1588
1588
// SAFETY: Caller has to check that `0 <= mid <= self.len()`
1589
1589
unsafe { ( self . get_unchecked ( ..mid) , self . get_unchecked ( mid..) ) }
1590
1590
}
@@ -1608,7 +1608,7 @@ impl<T> [T] {
1608
1608
///
1609
1609
/// # Examples
1610
1610
///
1611
- /// ```compile_fail
1611
+ /// ```
1612
1612
/// #![feature(slice_split_at_unchecked)]
1613
1613
///
1614
1614
/// let mut v = [1, 0, 3, 0, 5, 6];
@@ -1624,7 +1624,7 @@ impl<T> [T] {
1624
1624
/// ```
1625
1625
#[ unstable( feature = "slice_split_at_unchecked" , reason = "new API" , issue = "76014" ) ]
1626
1626
#[ inline]
1627
- unsafe fn split_at_mut_unchecked ( & mut self , mid : usize ) -> ( & mut [ T ] , & mut [ T ] ) {
1627
+ pub unsafe fn split_at_mut_unchecked ( & mut self , mid : usize ) -> ( & mut [ T ] , & mut [ T ] ) {
1628
1628
let len = self . len ( ) ;
1629
1629
let ptr = self . as_mut_ptr ( ) ;
1630
1630
0 commit comments