@@ -290,7 +290,7 @@ impl str {
290
290
}
291
291
292
292
/// Converts a mutable string slice to a mutable byte slice.
293
- #[ unstable ( feature = "str_mut_extras" , issue = "41119 " ) ]
293
+ #[ stable ( feature = "str_mut_extras" , since = "1.20.0 " ) ]
294
294
#[ inline( always) ]
295
295
pub unsafe fn as_bytes_mut ( & mut self ) -> & mut [ u8 ] {
296
296
core_str:: StrExt :: as_bytes_mut ( self )
@@ -328,14 +328,13 @@ impl str {
328
328
/// # Examples
329
329
///
330
330
/// ```
331
- /// # #![feature(str_checked_slicing)]
332
331
/// let v = "🗻∈🌏";
333
332
/// assert_eq!(Some("🗻"), v.get(0..4));
334
333
/// assert!(v.get(1..).is_none());
335
334
/// assert!(v.get(..8).is_none());
336
335
/// assert!(v.get(..42).is_none());
337
336
/// ```
338
- #[ unstable ( feature = "str_checked_slicing" , issue = "39932 " ) ]
337
+ #[ stable ( feature = "str_checked_slicing" , since = "1.20.0 " ) ]
339
338
#[ inline]
340
339
pub fn get < I : SliceIndex < str > > ( & self , i : I ) -> Option < & I :: Output > {
341
340
core_str:: StrExt :: get ( self , i)
@@ -351,14 +350,13 @@ impl str {
351
350
/// # Examples
352
351
///
353
352
/// ```
354
- /// # #![feature(str_checked_slicing)]
355
353
/// let mut v = String::from("🗻∈🌏");
356
354
/// assert_eq!(Some("🗻"), v.get_mut(0..4).map(|v| &*v));
357
355
/// assert!(v.get_mut(1..).is_none());
358
356
/// assert!(v.get_mut(..8).is_none());
359
357
/// assert!(v.get_mut(..42).is_none());
360
358
/// ```
361
- #[ unstable ( feature = "str_checked_slicing" , issue = "39932 " ) ]
359
+ #[ stable ( feature = "str_checked_slicing" , since = "1.20.0 " ) ]
362
360
#[ inline]
363
361
pub fn get_mut < I : SliceIndex < str > > ( & mut self , i : I ) -> Option < & mut I :: Output > {
364
362
core_str:: StrExt :: get_mut ( self , i)
@@ -383,15 +381,14 @@ impl str {
383
381
/// # Examples
384
382
///
385
383
/// ```
386
- /// # #![feature(str_checked_slicing)]
387
384
/// let v = "🗻∈🌏";
388
385
/// unsafe {
389
386
/// assert_eq!("🗻", v.get_unchecked(0..4));
390
387
/// assert_eq!("∈", v.get_unchecked(4..7));
391
388
/// assert_eq!("🌏", v.get_unchecked(7..11));
392
389
/// }
393
390
/// ```
394
- #[ unstable ( feature = "str_checked_slicing" , issue = "39932 " ) ]
391
+ #[ stable ( feature = "str_checked_slicing" , since = "1.20.0 " ) ]
395
392
#[ inline]
396
393
pub unsafe fn get_unchecked < I : SliceIndex < str > > ( & self , i : I ) -> & I :: Output {
397
394
core_str:: StrExt :: get_unchecked ( self , i)
@@ -416,15 +413,14 @@ impl str {
416
413
/// # Examples
417
414
///
418
415
/// ```
419
- /// # #![feature(str_checked_slicing)]
420
416
/// let mut v = String::from("🗻∈🌏");
421
417
/// unsafe {
422
418
/// assert_eq!("🗻", v.get_unchecked_mut(0..4));
423
419
/// assert_eq!("∈", v.get_unchecked_mut(4..7));
424
420
/// assert_eq!("🌏", v.get_unchecked_mut(7..11));
425
421
/// }
426
422
/// ```
427
- #[ unstable ( feature = "str_checked_slicing" , issue = "39932 " ) ]
423
+ #[ stable ( feature = "str_checked_slicing" , since = "1.20.0 " ) ]
428
424
#[ inline]
429
425
pub unsafe fn get_unchecked_mut < I : SliceIndex < str > > ( & mut self , i : I ) -> & mut I :: Output {
430
426
core_str:: StrExt :: get_unchecked_mut ( self , i)
@@ -1729,7 +1725,7 @@ impl str {
1729
1725
}
1730
1726
1731
1727
/// Converts a `Box<str>` into a `Box<[u8]>` without copying or allocating.
1732
- #[ unstable ( feature = "str_box_extras" , issue = "41119 " ) ]
1728
+ #[ stable ( feature = "str_box_extras" , since = "1.20.0 " ) ]
1733
1729
pub fn into_boxed_bytes ( self : Box < str > ) -> Box < [ u8 ] > {
1734
1730
self . into ( )
1735
1731
}
@@ -1996,7 +1992,7 @@ impl str {
1996
1992
1997
1993
/// Converts a boxed slice of bytes to a boxed string slice without checking
1998
1994
/// that the string contains valid UTF-8.
1999
- #[ unstable ( feature = "str_box_extras" , issue = "41119 " ) ]
1995
+ #[ stable ( feature = "str_box_extras" , since = "1.20.0 " ) ]
2000
1996
pub unsafe fn from_boxed_utf8_unchecked ( v : Box < [ u8 ] > ) -> Box < str > {
2001
1997
mem:: transmute ( v)
2002
1998
}
0 commit comments