@@ -1271,7 +1271,6 @@ impl<T> [T] {
1271
1271
/// # Examples
1272
1272
///
1273
1273
/// ```
1274
- /// #![feature(slice_as_chunks)]
1275
1274
/// let slice: &[char] = &['l', 'o', 'r', 'e', 'm', '!'];
1276
1275
/// let chunks: &[[char; 1]] =
1277
1276
/// // SAFETY: 1-element chunks never have remainder
@@ -1286,7 +1285,8 @@ impl<T> [T] {
1286
1285
/// // let chunks: &[[_; 5]] = slice.as_chunks_unchecked() // The slice length is not a multiple of 5
1287
1286
/// // let chunks: &[[_; 0]] = slice.as_chunks_unchecked() // Zero-length chunks are never allowed
1288
1287
/// ```
1289
- #[ unstable( feature = "slice_as_chunks" , issue = "74985" ) ]
1288
+ #[ stable( feature = "slice_as_chunks" , since = "CURRENT_RUSTC_VERSION" ) ]
1289
+ #[ rustc_const_stable( feature = "slice_as_chunks" , since = "CURRENT_RUSTC_VERSION" ) ]
1290
1290
#[ inline]
1291
1291
#[ must_use]
1292
1292
pub const unsafe fn as_chunks_unchecked < const N : usize > ( & self ) -> & [ [ T ; N ] ] {
@@ -1314,7 +1314,6 @@ impl<T> [T] {
1314
1314
/// # Examples
1315
1315
///
1316
1316
/// ```
1317
- /// #![feature(slice_as_chunks)]
1318
1317
/// let slice = ['l', 'o', 'r', 'e', 'm'];
1319
1318
/// let (chunks, remainder) = slice.as_chunks();
1320
1319
/// assert_eq!(chunks, &[['l', 'o'], ['r', 'e']]);
@@ -1324,14 +1323,14 @@ impl<T> [T] {
1324
1323
/// If you expect the slice to be an exact multiple, you can combine
1325
1324
/// `let`-`else` with an empty slice pattern:
1326
1325
/// ```
1327
- /// #![feature(slice_as_chunks)]
1328
1326
/// let slice = ['R', 'u', 's', 't'];
1329
1327
/// let (chunks, []) = slice.as_chunks::<2>() else {
1330
1328
/// panic!("slice didn't have even length")
1331
1329
/// };
1332
1330
/// assert_eq!(chunks, &[['R', 'u'], ['s', 't']]);
1333
1331
/// ```
1334
- #[ unstable( feature = "slice_as_chunks" , issue = "74985" ) ]
1332
+ #[ stable( feature = "slice_as_chunks" , since = "CURRENT_RUSTC_VERSION" ) ]
1333
+ #[ rustc_const_stable( feature = "slice_as_chunks" , since = "CURRENT_RUSTC_VERSION" ) ]
1335
1334
#[ inline]
1336
1335
#[ track_caller]
1337
1336
#[ must_use]
@@ -1359,13 +1358,13 @@ impl<T> [T] {
1359
1358
/// # Examples
1360
1359
///
1361
1360
/// ```
1362
- /// #![feature(slice_as_chunks)]
1363
1361
/// let slice = ['l', 'o', 'r', 'e', 'm'];
1364
1362
/// let (remainder, chunks) = slice.as_rchunks();
1365
1363
/// assert_eq!(remainder, &['l']);
1366
1364
/// assert_eq!(chunks, &[['o', 'r'], ['e', 'm']]);
1367
1365
/// ```
1368
- #[ unstable( feature = "slice_as_chunks" , issue = "74985" ) ]
1366
+ #[ stable( feature = "slice_as_chunks" , since = "CURRENT_RUSTC_VERSION" ) ]
1367
+ #[ rustc_const_stable( feature = "slice_as_chunks" , since = "CURRENT_RUSTC_VERSION" ) ]
1369
1368
#[ inline]
1370
1369
#[ track_caller]
1371
1370
#[ must_use]
@@ -1427,7 +1426,6 @@ impl<T> [T] {
1427
1426
/// # Examples
1428
1427
///
1429
1428
/// ```
1430
- /// #![feature(slice_as_chunks)]
1431
1429
/// let slice: &mut [char] = &mut ['l', 'o', 'r', 'e', 'm', '!'];
1432
1430
/// let chunks: &mut [[char; 1]] =
1433
1431
/// // SAFETY: 1-element chunks never have remainder
@@ -1444,7 +1442,8 @@ impl<T> [T] {
1444
1442
/// // let chunks: &[[_; 5]] = slice.as_chunks_unchecked_mut() // The slice length is not a multiple of 5
1445
1443
/// // let chunks: &[[_; 0]] = slice.as_chunks_unchecked_mut() // Zero-length chunks are never allowed
1446
1444
/// ```
1447
- #[ unstable( feature = "slice_as_chunks" , issue = "74985" ) ]
1445
+ #[ stable( feature = "slice_as_chunks" , since = "CURRENT_RUSTC_VERSION" ) ]
1446
+ #[ rustc_const_stable( feature = "slice_as_chunks" , since = "CURRENT_RUSTC_VERSION" ) ]
1448
1447
#[ inline]
1449
1448
#[ must_use]
1450
1449
pub const unsafe fn as_chunks_unchecked_mut < const N : usize > ( & mut self ) -> & mut [ [ T ; N ] ] {
@@ -1472,7 +1471,6 @@ impl<T> [T] {
1472
1471
/// # Examples
1473
1472
///
1474
1473
/// ```
1475
- /// #![feature(slice_as_chunks)]
1476
1474
/// let v = &mut [0, 0, 0, 0, 0];
1477
1475
/// let mut count = 1;
1478
1476
///
@@ -1484,7 +1482,8 @@ impl<T> [T] {
1484
1482
/// }
1485
1483
/// assert_eq!(v, &[1, 1, 2, 2, 9]);
1486
1484
/// ```
1487
- #[ unstable( feature = "slice_as_chunks" , issue = "74985" ) ]
1485
+ #[ stable( feature = "slice_as_chunks" , since = "CURRENT_RUSTC_VERSION" ) ]
1486
+ #[ rustc_const_stable( feature = "slice_as_chunks" , since = "CURRENT_RUSTC_VERSION" ) ]
1488
1487
#[ inline]
1489
1488
#[ track_caller]
1490
1489
#[ must_use]
@@ -1512,7 +1511,6 @@ impl<T> [T] {
1512
1511
/// # Examples
1513
1512
///
1514
1513
/// ```
1515
- /// #![feature(slice_as_chunks)]
1516
1514
/// let v = &mut [0, 0, 0, 0, 0];
1517
1515
/// let mut count = 1;
1518
1516
///
@@ -1524,7 +1522,8 @@ impl<T> [T] {
1524
1522
/// }
1525
1523
/// assert_eq!(v, &[9, 1, 1, 2, 2]);
1526
1524
/// ```
1527
- #[ unstable( feature = "slice_as_chunks" , issue = "74985" ) ]
1525
+ #[ stable( feature = "slice_as_chunks" , since = "CURRENT_RUSTC_VERSION" ) ]
1526
+ #[ rustc_const_stable( feature = "slice_as_chunks" , since = "CURRENT_RUSTC_VERSION" ) ]
1528
1527
#[ inline]
1529
1528
#[ track_caller]
1530
1529
#[ must_use]
0 commit comments