@@ -327,8 +327,6 @@ impl<T> [T] {
327327 /// # Examples
328328 ///
329329 /// ```
330- /// #![feature(slice_first_last_chunk)]
331- ///
332330 /// let u = [10, 40, 30];
333331 /// assert_eq!(Some(&[10, 40]), u.first_chunk::<2>());
334332 ///
@@ -338,9 +336,9 @@ impl<T> [T] {
338336 /// let w: &[i32] = &[];
339337 /// assert_eq!(Some(&[]), w.first_chunk::<0>());
340338 /// ```
341- #[ unstable( feature = "slice_first_last_chunk" , issue = "111774" ) ]
342- #[ rustc_const_unstable( feature = "slice_first_last_chunk" , issue = "111774" ) ]
343339 #[ inline]
340+ #[ stable( feature = "slice_first_last_chunk" , since = "CURRENT_RUSTC_VERSION" ) ]
341+ #[ rustc_const_stable( feature = "slice_first_last_chunk" , since = "CURRENT_RUSTC_VERSION" ) ]
344342 pub const fn first_chunk < const N : usize > ( & self ) -> Option < & [ T ; N ] > {
345343 if self . len ( ) < N {
346344 None
@@ -358,8 +356,6 @@ impl<T> [T] {
358356 /// # Examples
359357 ///
360358 /// ```
361- /// #![feature(slice_first_last_chunk)]
362- ///
363359 /// let x = &mut [0, 1, 2];
364360 ///
365361 /// if let Some(first) = x.first_chunk_mut::<2>() {
@@ -370,9 +366,9 @@ impl<T> [T] {
370366 ///
371367 /// assert_eq!(None, x.first_chunk_mut::<4>());
372368 /// ```
373- #[ unstable( feature = "slice_first_last_chunk" , issue = "111774" ) ]
374- #[ rustc_const_unstable( feature = "slice_first_last_chunk" , issue = "111774" ) ]
375369 #[ inline]
370+ #[ stable( feature = "slice_first_last_chunk" , since = "CURRENT_RUSTC_VERSION" ) ]
371+ #[ rustc_const_unstable( feature = "const_slice_first_last_chunk" , issue = "111774" ) ]
376372 pub const fn first_chunk_mut < const N : usize > ( & mut self ) -> Option < & mut [ T ; N ] > {
377373 if self . len ( ) < N {
378374 None
@@ -391,8 +387,6 @@ impl<T> [T] {
391387 /// # Examples
392388 ///
393389 /// ```
394- /// #![feature(slice_first_last_chunk)]
395- ///
396390 /// let x = &[0, 1, 2];
397391 ///
398392 /// if let Some((first, elements)) = x.split_first_chunk::<2>() {
@@ -402,9 +396,10 @@ impl<T> [T] {
402396 ///
403397 /// assert_eq!(None, x.split_first_chunk::<4>());
404398 /// ```
405- #[ unstable( feature = "slice_first_last_chunk" , issue = "111774" ) ]
406- #[ rustc_const_unstable( feature = "slice_first_last_chunk" , issue = "111774" ) ]
407399 #[ inline]
400+ #[ stable( feature = "slice_first_last_chunk" , since = "CURRENT_RUSTC_VERSION" ) ]
401+ #[ rustc_allow_const_fn_unstable( slice_split_at_unchecked) ] // pointer math implementation
402+ #[ rustc_const_stable( feature = "slice_first_last_chunk" , since = "CURRENT_RUSTC_VERSION" ) ]
408403 pub const fn split_first_chunk < const N : usize > ( & self ) -> Option < ( & [ T ; N ] , & [ T ] ) > {
409404 if self . len ( ) < N {
410405 None
@@ -426,8 +421,6 @@ impl<T> [T] {
426421 /// # Examples
427422 ///
428423 /// ```
429- /// #![feature(slice_first_last_chunk)]
430- ///
431424 /// let x = &mut [0, 1, 2];
432425 ///
433426 /// if let Some((first, elements)) = x.split_first_chunk_mut::<2>() {
@@ -439,9 +432,9 @@ impl<T> [T] {
439432 ///
440433 /// assert_eq!(None, x.split_first_chunk_mut::<4>());
441434 /// ```
442- #[ unstable( feature = "slice_first_last_chunk" , issue = "111774" ) ]
443- #[ rustc_const_unstable( feature = "slice_first_last_chunk" , issue = "111774" ) ]
444435 #[ inline]
436+ #[ stable( feature = "slice_first_last_chunk" , since = "CURRENT_RUSTC_VERSION" ) ]
437+ #[ rustc_const_unstable( feature = "const_slice_first_last_chunk" , issue = "111774" ) ]
445438 pub const fn split_first_chunk_mut < const N : usize > (
446439 & mut self ,
447440 ) -> Option < ( & mut [ T ; N ] , & mut [ T ] ) > {
@@ -465,8 +458,6 @@ impl<T> [T] {
465458 /// # Examples
466459 ///
467460 /// ```
468- /// #![feature(slice_first_last_chunk)]
469- ///
470461 /// let x = &[0, 1, 2];
471462 ///
472463 /// if let Some((elements, last)) = x.split_last_chunk::<2>() {
@@ -476,9 +467,10 @@ impl<T> [T] {
476467 ///
477468 /// assert_eq!(None, x.split_last_chunk::<4>());
478469 /// ```
479- #[ unstable( feature = "slice_first_last_chunk" , issue = "111774" ) ]
480- #[ rustc_const_unstable( feature = "slice_first_last_chunk" , issue = "111774" ) ]
481470 #[ inline]
471+ #[ stable( feature = "slice_first_last_chunk" , since = "CURRENT_RUSTC_VERSION" ) ]
472+ #[ rustc_allow_const_fn_unstable( slice_split_at_unchecked) ] // pointer math implementation
473+ #[ rustc_const_stable( feature = "slice_first_last_chunk" , since = "CURRENT_RUSTC_VERSION" ) ]
482474 pub const fn split_last_chunk < const N : usize > ( & self ) -> Option < ( & [ T ] , & [ T ; N ] ) > {
483475 if self . len ( ) < N {
484476 None
@@ -500,8 +492,6 @@ impl<T> [T] {
500492 /// # Examples
501493 ///
502494 /// ```
503- /// #![feature(slice_first_last_chunk)]
504- ///
505495 /// let x = &mut [0, 1, 2];
506496 ///
507497 /// if let Some((elements, last)) = x.split_last_chunk_mut::<2>() {
@@ -513,9 +503,9 @@ impl<T> [T] {
513503 ///
514504 /// assert_eq!(None, x.split_last_chunk_mut::<4>());
515505 /// ```
516- #[ unstable( feature = "slice_first_last_chunk" , issue = "111774" ) ]
517- #[ rustc_const_unstable( feature = "slice_first_last_chunk" , issue = "111774" ) ]
518506 #[ inline]
507+ #[ stable( feature = "slice_first_last_chunk" , since = "CURRENT_RUSTC_VERSION" ) ]
508+ #[ rustc_const_unstable( feature = "const_slice_first_last_chunk" , issue = "111774" ) ]
519509 pub const fn split_last_chunk_mut < const N : usize > (
520510 & mut self ,
521511 ) -> Option < ( & mut [ T ] , & mut [ T ; N ] ) > {
@@ -539,8 +529,6 @@ impl<T> [T] {
539529 /// # Examples
540530 ///
541531 /// ```
542- /// #![feature(slice_first_last_chunk)]
543- ///
544532 /// let u = [10, 40, 30];
545533 /// assert_eq!(Some(&[40, 30]), u.last_chunk::<2>());
546534 ///
@@ -550,9 +538,9 @@ impl<T> [T] {
550538 /// let w: &[i32] = &[];
551539 /// assert_eq!(Some(&[]), w.last_chunk::<0>());
552540 /// ```
553- #[ unstable( feature = "slice_first_last_chunk" , issue = "111774" ) ]
554- #[ rustc_const_unstable( feature = "slice_first_last_chunk" , issue = "111774" ) ]
555541 #[ inline]
542+ #[ stable( feature = "slice_first_last_chunk" , since = "CURRENT_RUSTC_VERSION" ) ]
543+ #[ rustc_const_unstable( feature = "const_slice_first_last_chunk" , issue = "111774" ) ]
556544 pub const fn last_chunk < const N : usize > ( & self ) -> Option < & [ T ; N ] > {
557545 if self . len ( ) < N {
558546 None
@@ -574,8 +562,6 @@ impl<T> [T] {
574562 /// # Examples
575563 ///
576564 /// ```
577- /// #![feature(slice_first_last_chunk)]
578- ///
579565 /// let x = &mut [0, 1, 2];
580566 ///
581567 /// if let Some(last) = x.last_chunk_mut::<2>() {
@@ -586,9 +572,9 @@ impl<T> [T] {
586572 ///
587573 /// assert_eq!(None, x.last_chunk_mut::<4>());
588574 /// ```
589- #[ unstable( feature = "slice_first_last_chunk" , issue = "111774" ) ]
590- #[ rustc_const_unstable( feature = "slice_first_last_chunk" , issue = "111774" ) ]
591575 #[ inline]
576+ #[ stable( feature = "slice_first_last_chunk" , since = "CURRENT_RUSTC_VERSION" ) ]
577+ #[ rustc_const_unstable( feature = "const_slice_first_last_chunk" , issue = "111774" ) ]
592578 pub const fn last_chunk_mut < const N : usize > ( & mut self ) -> Option < & mut [ T ; N ] > {
593579 if self . len ( ) < N {
594580 None
0 commit comments