@@ -327,8 +327,6 @@ impl<T> [T] {
327
327
/// # Examples
328
328
///
329
329
/// ```
330
- /// #![feature(slice_first_last_chunk)]
331
- ///
332
330
/// let u = [10, 40, 30];
333
331
/// assert_eq!(Some(&[10, 40]), u.first_chunk::<2>());
334
332
///
@@ -338,9 +336,9 @@ impl<T> [T] {
338
336
/// let w: &[i32] = &[];
339
337
/// assert_eq!(Some(&[]), w.first_chunk::<0>());
340
338
/// ```
341
- #[ unstable( feature = "slice_first_last_chunk" , issue = "111774" ) ]
342
- #[ rustc_const_unstable( feature = "slice_first_last_chunk" , issue = "111774" ) ]
343
339
#[ 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" ) ]
344
342
pub const fn first_chunk < const N : usize > ( & self ) -> Option < & [ T ; N ] > {
345
343
if self . len ( ) < N {
346
344
None
@@ -358,8 +356,6 @@ impl<T> [T] {
358
356
/// # Examples
359
357
///
360
358
/// ```
361
- /// #![feature(slice_first_last_chunk)]
362
- ///
363
359
/// let x = &mut [0, 1, 2];
364
360
///
365
361
/// if let Some(first) = x.first_chunk_mut::<2>() {
@@ -370,9 +366,9 @@ impl<T> [T] {
370
366
///
371
367
/// assert_eq!(None, x.first_chunk_mut::<4>());
372
368
/// ```
373
- #[ unstable( feature = "slice_first_last_chunk" , issue = "111774" ) ]
374
- #[ rustc_const_unstable( feature = "slice_first_last_chunk" , issue = "111774" ) ]
375
369
#[ inline]
370
+ #[ stable( feature = "slice_first_last_chunk" , since = "CURRENT_RUSTC_VERSION" ) ]
371
+ #[ rustc_const_unstable( feature = "const_slice_first_last_chunk" , issue = "111774" ) ]
376
372
pub const fn first_chunk_mut < const N : usize > ( & mut self ) -> Option < & mut [ T ; N ] > {
377
373
if self . len ( ) < N {
378
374
None
@@ -391,8 +387,6 @@ impl<T> [T] {
391
387
/// # Examples
392
388
///
393
389
/// ```
394
- /// #![feature(slice_first_last_chunk)]
395
- ///
396
390
/// let x = &[0, 1, 2];
397
391
///
398
392
/// if let Some((first, elements)) = x.split_first_chunk::<2>() {
@@ -402,9 +396,9 @@ impl<T> [T] {
402
396
///
403
397
/// assert_eq!(None, x.split_first_chunk::<4>());
404
398
/// ```
405
- #[ unstable( feature = "slice_first_last_chunk" , issue = "111774" ) ]
406
- #[ rustc_const_unstable( feature = "slice_first_last_chunk" , issue = "111774" ) ]
407
399
#[ inline]
400
+ #[ stable( feature = "slice_first_last_chunk" , since = "CURRENT_RUSTC_VERSION" ) ]
401
+ #[ rustc_const_stable( feature = "slice_first_last_chunk" , since = "CURRENT_RUSTC_VERSION" ) ]
408
402
pub const fn split_first_chunk < const N : usize > ( & self ) -> Option < ( & [ T ; N ] , & [ T ] ) > {
409
403
if self . len ( ) < N {
410
404
None
@@ -426,8 +420,6 @@ impl<T> [T] {
426
420
/// # Examples
427
421
///
428
422
/// ```
429
- /// #![feature(slice_first_last_chunk)]
430
- ///
431
423
/// let x = &mut [0, 1, 2];
432
424
///
433
425
/// if let Some((first, elements)) = x.split_first_chunk_mut::<2>() {
@@ -439,9 +431,9 @@ impl<T> [T] {
439
431
///
440
432
/// assert_eq!(None, x.split_first_chunk_mut::<4>());
441
433
/// ```
442
- #[ unstable( feature = "slice_first_last_chunk" , issue = "111774" ) ]
443
- #[ rustc_const_unstable( feature = "slice_first_last_chunk" , issue = "111774" ) ]
444
434
#[ inline]
435
+ #[ stable( feature = "slice_first_last_chunk" , since = "CURRENT_RUSTC_VERSION" ) ]
436
+ #[ rustc_const_unstable( feature = "const_slice_first_last_chunk" , issue = "111774" ) ]
445
437
pub const fn split_first_chunk_mut < const N : usize > (
446
438
& mut self ,
447
439
) -> Option < ( & mut [ T ; N ] , & mut [ T ] ) > {
@@ -465,8 +457,6 @@ impl<T> [T] {
465
457
/// # Examples
466
458
///
467
459
/// ```
468
- /// #![feature(slice_first_last_chunk)]
469
- ///
470
460
/// let x = &[0, 1, 2];
471
461
///
472
462
/// if let Some((elements, last)) = x.split_last_chunk::<2>() {
@@ -476,9 +466,9 @@ impl<T> [T] {
476
466
///
477
467
/// assert_eq!(None, x.split_last_chunk::<4>());
478
468
/// ```
479
- #[ unstable( feature = "slice_first_last_chunk" , issue = "111774" ) ]
480
- #[ rustc_const_unstable( feature = "slice_first_last_chunk" , issue = "111774" ) ]
481
469
#[ inline]
470
+ #[ stable( feature = "slice_first_last_chunk" , since = "CURRENT_RUSTC_VERSION" ) ]
471
+ #[ rustc_const_stable( feature = "slice_first_last_chunk" , since = "CURRENT_RUSTC_VERSION" ) ]
482
472
pub const fn split_last_chunk < const N : usize > ( & self ) -> Option < ( & [ T ] , & [ T ; N ] ) > {
483
473
if self . len ( ) < N {
484
474
None
@@ -500,8 +490,6 @@ impl<T> [T] {
500
490
/// # Examples
501
491
///
502
492
/// ```
503
- /// #![feature(slice_first_last_chunk)]
504
- ///
505
493
/// let x = &mut [0, 1, 2];
506
494
///
507
495
/// if let Some((elements, last)) = x.split_last_chunk_mut::<2>() {
@@ -513,9 +501,9 @@ impl<T> [T] {
513
501
///
514
502
/// assert_eq!(None, x.split_last_chunk_mut::<4>());
515
503
/// ```
516
- #[ unstable( feature = "slice_first_last_chunk" , issue = "111774" ) ]
517
- #[ rustc_const_unstable( feature = "slice_first_last_chunk" , issue = "111774" ) ]
518
504
#[ inline]
505
+ #[ stable( feature = "slice_first_last_chunk" , since = "CURRENT_RUSTC_VERSION" ) ]
506
+ #[ rustc_const_unstable( feature = "const_slice_first_last_chunk" , issue = "111774" ) ]
519
507
pub const fn split_last_chunk_mut < const N : usize > (
520
508
& mut self ,
521
509
) -> Option < ( & mut [ T ] , & mut [ T ; N ] ) > {
@@ -539,8 +527,6 @@ impl<T> [T] {
539
527
/// # Examples
540
528
///
541
529
/// ```
542
- /// #![feature(slice_first_last_chunk)]
543
- ///
544
530
/// let u = [10, 40, 30];
545
531
/// assert_eq!(Some(&[40, 30]), u.last_chunk::<2>());
546
532
///
@@ -550,9 +536,9 @@ impl<T> [T] {
550
536
/// let w: &[i32] = &[];
551
537
/// assert_eq!(Some(&[]), w.last_chunk::<0>());
552
538
/// ```
553
- #[ unstable( feature = "slice_first_last_chunk" , issue = "111774" ) ]
554
- #[ rustc_const_unstable( feature = "slice_first_last_chunk" , issue = "111774" ) ]
555
539
#[ inline]
540
+ #[ stable( feature = "slice_first_last_chunk" , since = "CURRENT_RUSTC_VERSION" ) ]
541
+ #[ rustc_const_unstable( feature = "const_slice_first_last_chunk" , issue = "111774" ) ]
556
542
pub const fn last_chunk < const N : usize > ( & self ) -> Option < & [ T ; N ] > {
557
543
if self . len ( ) < N {
558
544
None
@@ -574,8 +560,6 @@ impl<T> [T] {
574
560
/// # Examples
575
561
///
576
562
/// ```
577
- /// #![feature(slice_first_last_chunk)]
578
- ///
579
563
/// let x = &mut [0, 1, 2];
580
564
///
581
565
/// if let Some(last) = x.last_chunk_mut::<2>() {
@@ -586,9 +570,9 @@ impl<T> [T] {
586
570
///
587
571
/// assert_eq!(None, x.last_chunk_mut::<4>());
588
572
/// ```
589
- #[ unstable( feature = "slice_first_last_chunk" , issue = "111774" ) ]
590
- #[ rustc_const_unstable( feature = "slice_first_last_chunk" , issue = "111774" ) ]
591
573
#[ inline]
574
+ #[ stable( feature = "slice_first_last_chunk" , since = "CURRENT_RUSTC_VERSION" ) ]
575
+ #[ rustc_const_unstable( feature = "const_slice_first_last_chunk" , issue = "111774" ) ]
592
576
pub const fn last_chunk_mut < const N : usize > ( & mut self ) -> Option < & mut [ T ; N ] > {
593
577
if self . len ( ) < N {
594
578
None
@@ -1885,7 +1869,6 @@ impl<T> [T] {
1885
1869
/// ```
1886
1870
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
1887
1871
#[ rustc_const_stable( feature = "const_slice_split_at_not_mut" , since = "1.71.0" ) ]
1888
- #[ rustc_allow_const_fn_unstable( slice_split_at_unchecked) ]
1889
1872
#[ inline]
1890
1873
#[ track_caller]
1891
1874
#[ must_use]
@@ -1972,7 +1955,10 @@ impl<T> [T] {
1972
1955
/// }
1973
1956
/// ```
1974
1957
#[ unstable( feature = "slice_split_at_unchecked" , reason = "new API" , issue = "76014" ) ]
1975
- #[ rustc_const_unstable( feature = "slice_split_at_unchecked" , issue = "76014" ) ]
1958
+ #[ rustc_const_stable(
1959
+ feature = "const_slice_split_at_unchecked" ,
1960
+ since = "CURRENT_RUSTC_VERSION"
1961
+ ) ]
1976
1962
#[ inline]
1977
1963
#[ must_use]
1978
1964
pub const unsafe fn split_at_unchecked ( & self , mid : usize ) -> ( & [ T ] , & [ T ] ) {
0 commit comments