@@ -228,8 +228,6 @@ impl str {
228228 /// # Examples
229229 ///
230230 /// ```
231- /// #![feature(str_char)]
232- ///
233231 /// let s = "Löwe 老虎 Léopard";
234232 /// assert!(s.is_char_boundary(0));
235233 /// // start of `老`
@@ -242,12 +240,7 @@ impl str {
242240 /// // third byte of `老`
243241 /// assert!(!s.is_char_boundary(8));
244242 /// ```
245- #[ unstable( feature = "str_char" ,
246- reason = "it is unclear whether this method pulls its weight \
247- with the existence of the char_indices iterator or \
248- this method may want to be replaced with checked \
249- slicing",
250- issue = "27754" ) ]
243+ #[ stable( feature = "is_char_boundary" , since = "1.9.0" ) ]
251244 #[ inline]
252245 pub fn is_char_boundary ( & self , index : usize ) -> bool {
253246 core_str:: StrExt :: is_char_boundary ( self , index)
@@ -374,6 +367,7 @@ impl str {
374367 ///
375368 /// ```
376369 /// #![feature(str_char)]
370+ /// #![allow(deprecated)]
377371 ///
378372 /// use std::str::CharRange;
379373 ///
@@ -408,6 +402,9 @@ impl str {
408402 removed altogether",
409403 issue = "27754" ) ]
410404 #[ inline]
405+ #[ rustc_deprecated( reason = "use slicing plus chars() plus len_utf8" ,
406+ since = "1.9.0" ) ]
407+ #[ allow( deprecated) ]
411408 pub fn char_range_at ( & self , start : usize ) -> CharRange {
412409 core_str:: StrExt :: char_range_at ( self , start)
413410 }
@@ -432,6 +429,7 @@ impl str {
432429 ///
433430 /// ```
434431 /// #![feature(str_char)]
432+ /// #![allow(deprecated)]
435433 ///
436434 /// use std::str::CharRange;
437435 ///
@@ -466,6 +464,9 @@ impl str {
466464 eventually removed altogether",
467465 issue = "27754" ) ]
468466 #[ inline]
467+ #[ rustc_deprecated( reason = "use slicing plus chars().rev() plus len_utf8" ,
468+ since = "1.9.0" ) ]
469+ #[ allow( deprecated) ]
469470 pub fn char_range_at_reverse ( & self , start : usize ) -> CharRange {
470471 core_str:: StrExt :: char_range_at_reverse ( self , start)
471472 }
@@ -481,6 +482,7 @@ impl str {
481482 ///
482483 /// ```
483484 /// #![feature(str_char)]
485+ /// #![allow(deprecated)]
484486 ///
485487 /// let s = "abπc";
486488 /// assert_eq!(s.char_at(1), 'b');
@@ -495,6 +497,9 @@ impl str {
495497 subslice",
496498 issue = "27754" ) ]
497499 #[ inline]
500+ #[ allow( deprecated) ]
501+ #[ rustc_deprecated( reason = "use slicing plus chars()" ,
502+ since = "1.9.0" ) ]
498503 pub fn char_at ( & self , i : usize ) -> char {
499504 core_str:: StrExt :: char_at ( self , i)
500505 }
@@ -511,6 +516,7 @@ impl str {
511516 ///
512517 /// ```
513518 /// #![feature(str_char)]
519+ /// #![allow(deprecated)]
514520 ///
515521 /// let s = "abπc";
516522 /// assert_eq!(s.char_at_reverse(1), 'a');
@@ -523,6 +529,9 @@ impl str {
523529 cases generate panics",
524530 issue = "27754" ) ]
525531 #[ inline]
532+ #[ rustc_deprecated( reason = "use slicing plus chars().rev()" ,
533+ since = "1.9.0" ) ]
534+ #[ allow( deprecated) ]
526535 pub fn char_at_reverse ( & self , i : usize ) -> char {
527536 core_str:: StrExt :: char_at_reverse ( self , i)
528537 }
@@ -541,6 +550,7 @@ impl str {
541550 ///
542551 /// ```
543552 /// #![feature(str_char)]
553+ /// #![allow(deprecated)]
544554 ///
545555 /// let s = "Łódź"; // \u{141}o\u{301}dz\u{301}
546556 /// let (c, s1) = s.slice_shift_char().unwrap();
@@ -559,6 +569,9 @@ impl str {
559569 and/or char_indices iterators",
560570 issue = "27754" ) ]
561571 #[ inline]
572+ #[ rustc_deprecated( reason = "use chars() plus Chars::as_str" ,
573+ since = "1.9.0" ) ]
574+ #[ allow( deprecated) ]
562575 pub fn slice_shift_char ( & self ) -> Option < ( char , & str ) > {
563576 core_str:: StrExt :: slice_shift_char ( self )
564577 }
0 commit comments