@@ -78,7 +78,7 @@ pub use raw::{from_raw_parts, from_raw_parts_mut};
78
78
79
79
/// Calculates the direction and split point of a one-sided range.
80
80
///
81
- /// This is a helper function for `take ` and `take_mut ` that returns
81
+ /// This is a helper function for `split_off ` and `split_off_mut ` that returns
82
82
/// the direction of the split (front or back) as well as the index at
83
83
/// which to split. Returns `None` if the split index would overflow.
84
84
#[ inline]
@@ -4313,8 +4313,6 @@ impl<T> [T] {
4313
4313
/// Splitting off the first three elements of a slice:
4314
4314
///
4315
4315
/// ```
4316
- /// #![feature(slice_take)]
4317
- ///
4318
4316
/// let mut slice: &[_] = &['a', 'b', 'c', 'd'];
4319
4317
/// let mut first_three = slice.split_off(..3).unwrap();
4320
4318
///
@@ -4325,8 +4323,6 @@ impl<T> [T] {
4325
4323
/// Splitting off the last two elements of a slice:
4326
4324
///
4327
4325
/// ```
4328
- /// #![feature(slice_take)]
4329
- ///
4330
4326
/// let mut slice: &[_] = &['a', 'b', 'c', 'd'];
4331
4327
/// let mut tail = slice.split_off(2..).unwrap();
4332
4328
///
@@ -4337,8 +4333,6 @@ impl<T> [T] {
4337
4333
/// Getting `None` when `range` is out of bounds:
4338
4334
///
4339
4335
/// ```
4340
- /// #![feature(slice_take)]
4341
- ///
4342
4336
/// let mut slice: &[_] = &['a', 'b', 'c', 'd'];
4343
4337
///
4344
4338
/// assert_eq!(None, slice.split_off(5..));
@@ -4349,7 +4343,7 @@ impl<T> [T] {
4349
4343
/// ```
4350
4344
#[ inline]
4351
4345
#[ must_use = "method does not modify the slice if the range is out of bounds" ]
4352
- #[ unstable ( feature = "slice_take" , issue = "62280 " ) ]
4346
+ #[ stable ( feature = "slice_take" , since = "CURRENT_RUSTC_VERSION " ) ]
4353
4347
pub fn split_off < ' a , R : OneSidedRange < usize > > (
4354
4348
self : & mut & ' a Self ,
4355
4349
range : R ,
@@ -4385,8 +4379,6 @@ impl<T> [T] {
4385
4379
/// Splitting off the first three elements of a slice:
4386
4380
///
4387
4381
/// ```
4388
- /// #![feature(slice_take)]
4389
- ///
4390
4382
/// let mut slice: &mut [_] = &mut ['a', 'b', 'c', 'd'];
4391
4383
/// let mut first_three = slice.split_off_mut(..3).unwrap();
4392
4384
///
@@ -4397,8 +4389,6 @@ impl<T> [T] {
4397
4389
/// Taking the last two elements of a slice:
4398
4390
///
4399
4391
/// ```
4400
- /// #![feature(slice_take)]
4401
- ///
4402
4392
/// let mut slice: &mut [_] = &mut ['a', 'b', 'c', 'd'];
4403
4393
/// let mut tail = slice.split_off_mut(2..).unwrap();
4404
4394
///
@@ -4409,8 +4399,6 @@ impl<T> [T] {
4409
4399
/// Getting `None` when `range` is out of bounds:
4410
4400
///
4411
4401
/// ```
4412
- /// #![feature(slice_take)]
4413
- ///
4414
4402
/// let mut slice: &mut [_] = &mut ['a', 'b', 'c', 'd'];
4415
4403
///
4416
4404
/// assert_eq!(None, slice.split_off_mut(5..));
@@ -4421,7 +4409,7 @@ impl<T> [T] {
4421
4409
/// ```
4422
4410
#[ inline]
4423
4411
#[ must_use = "method does not modify the slice if the range is out of bounds" ]
4424
- #[ unstable ( feature = "slice_take" , issue = "62280 " ) ]
4412
+ #[ stable ( feature = "slice_take" , since = "CURRENT_RUSTC_VERSION " ) ]
4425
4413
pub fn split_off_mut < ' a , R : OneSidedRange < usize > > (
4426
4414
self : & mut & ' a mut Self ,
4427
4415
range : R ,
@@ -4451,16 +4439,14 @@ impl<T> [T] {
4451
4439
/// # Examples
4452
4440
///
4453
4441
/// ```
4454
- /// #![feature(slice_take)]
4455
- ///
4456
4442
/// let mut slice: &[_] = &['a', 'b', 'c'];
4457
4443
/// let first = slice.split_off_first().unwrap();
4458
4444
///
4459
4445
/// assert_eq!(slice, &['b', 'c']);
4460
4446
/// assert_eq!(first, &'a');
4461
4447
/// ```
4462
4448
#[ inline]
4463
- #[ unstable ( feature = "slice_take" , issue = "62280 " ) ]
4449
+ #[ stable ( feature = "slice_take" , since = "CURRENT_RUSTC_VERSION " ) ]
4464
4450
pub fn split_off_first < ' a > ( self : & mut & ' a Self ) -> Option < & ' a T > {
4465
4451
let ( first, rem) = self . split_first ( ) ?;
4466
4452
* self = rem;
@@ -4475,8 +4461,6 @@ impl<T> [T] {
4475
4461
/// # Examples
4476
4462
///
4477
4463
/// ```
4478
- /// #![feature(slice_take)]
4479
- ///
4480
4464
/// let mut slice: &mut [_] = &mut ['a', 'b', 'c'];
4481
4465
/// let first = slice.split_off_first_mut().unwrap();
4482
4466
/// *first = 'd';
@@ -4485,7 +4469,7 @@ impl<T> [T] {
4485
4469
/// assert_eq!(first, &'d');
4486
4470
/// ```
4487
4471
#[ inline]
4488
- #[ unstable ( feature = "slice_take" , issue = "62280 " ) ]
4472
+ #[ stable ( feature = "slice_take" , since = "CURRENT_RUSTC_VERSION " ) ]
4489
4473
pub fn split_off_first_mut < ' a > ( self : & mut & ' a mut Self ) -> Option < & ' a mut T > {
4490
4474
let ( first, rem) = mem:: take ( self ) . split_first_mut ( ) ?;
4491
4475
* self = rem;
@@ -4500,16 +4484,14 @@ impl<T> [T] {
4500
4484
/// # Examples
4501
4485
///
4502
4486
/// ```
4503
- /// #![feature(slice_take)]
4504
- ///
4505
4487
/// let mut slice: &[_] = &['a', 'b', 'c'];
4506
4488
/// let last = slice.split_off_last().unwrap();
4507
4489
///
4508
4490
/// assert_eq!(slice, &['a', 'b']);
4509
4491
/// assert_eq!(last, &'c');
4510
4492
/// ```
4511
4493
#[ inline]
4512
- #[ unstable ( feature = "slice_take" , issue = "62280 " ) ]
4494
+ #[ stable ( feature = "slice_take" , since = "CURRENT_RUSTC_VERSION " ) ]
4513
4495
pub fn split_off_last < ' a > ( self : & mut & ' a Self ) -> Option < & ' a T > {
4514
4496
let ( last, rem) = self . split_last ( ) ?;
4515
4497
* self = rem;
@@ -4524,8 +4506,6 @@ impl<T> [T] {
4524
4506
/// # Examples
4525
4507
///
4526
4508
/// ```
4527
- /// #![feature(slice_take)]
4528
- ///
4529
4509
/// let mut slice: &mut [_] = &mut ['a', 'b', 'c'];
4530
4510
/// let last = slice.split_off_last_mut().unwrap();
4531
4511
/// *last = 'd';
@@ -4534,7 +4514,7 @@ impl<T> [T] {
4534
4514
/// assert_eq!(last, &'d');
4535
4515
/// ```
4536
4516
#[ inline]
4537
- #[ unstable ( feature = "slice_take" , issue = "62280 " ) ]
4517
+ #[ stable ( feature = "slice_take" , since = "CURRENT_RUSTC_VERSION " ) ]
4538
4518
pub fn split_off_last_mut < ' a > ( self : & mut & ' a mut Self ) -> Option < & ' a mut T > {
4539
4519
let ( last, rem) = mem:: take ( self ) . split_last_mut ( ) ?;
4540
4520
* self = rem;
0 commit comments