@@ -840,6 +840,9 @@ pub trait Read {
840840                                          of where errors happen is currently \ 
841841                                          unclear and may change", 
842842               issue = "27802" ) ]  
843+     #[ rustc_deprecated( since = "1.27.0" ,  reason = "Use str::from_utf8 instead:  
844+         https://doc.rust-lang.org/nightly/std/str/struct.Utf8Error.html#examples" ) ] 
845+     #[ allow( deprecated) ]  
843846    fn  chars ( self )  -> Chars < Self >  where  Self :  Sized  { 
844847        Chars  {  inner :  self  } 
845848    } 
@@ -2010,16 +2013,22 @@ impl<R: Read> Iterator for Bytes<R> {
20102013/// [chars]: trait.Read.html#method.chars 
20112014#[ unstable( feature = "io" ,  reason = "awaiting stability of Read::chars" ,  
20122015           issue = "27802" ) ]  
2016+ #[ rustc_deprecated( since = "1.27.0" ,  reason = "Use str::from_utf8 instead:  
2017+     https://doc.rust-lang.org/nightly/std/str/struct.Utf8Error.html#examples" ) ] 
20132018#[ derive( Debug ) ]  
2019+ #[ allow( deprecated) ]  
20142020pub  struct  Chars < R >  { 
20152021    inner :  R , 
20162022} 
20172023
20182024/// An enumeration of possible errors that can be generated from the `Chars` 
20192025/// adapter. 
2020- #[ derive( Debug ) ]  
20212026#[ unstable( feature = "io" ,  reason = "awaiting stability of Read::chars" ,  
20222027           issue = "27802" ) ]  
2028+ #[ rustc_deprecated( since = "1.27.0" ,  reason = "Use str::from_utf8 instead:  
2029+     https://doc.rust-lang.org/nightly/std/str/struct.Utf8Error.html#examples" ) ] 
2030+ #[ derive( Debug ) ]  
2031+ #[ allow( deprecated) ]  
20232032pub  enum  CharsError  { 
20242033    /// Variant representing that the underlying stream was read successfully 
20252034     /// but it did not contain valid utf8 data. 
@@ -2031,6 +2040,7 @@ pub enum CharsError {
20312040
20322041#[ unstable( feature = "io" ,  reason = "awaiting stability of Read::chars" ,  
20332042           issue = "27802" ) ]  
2043+ #[ allow( deprecated) ]  
20342044impl < R :  Read >  Iterator  for  Chars < R >  { 
20352045    type  Item  = result:: Result < char ,  CharsError > ; 
20362046
@@ -2063,6 +2073,7 @@ impl<R: Read> Iterator for Chars<R> {
20632073
20642074#[ unstable( feature = "io" ,  reason = "awaiting stability of Read::chars" ,  
20652075           issue = "27802" ) ]  
2076+ #[ allow( deprecated) ]  
20662077impl  std_error:: Error  for  CharsError  { 
20672078    fn  description ( & self )  -> & str  { 
20682079        match  * self  { 
@@ -2080,6 +2091,7 @@ impl std_error::Error for CharsError {
20802091
20812092#[ unstable( feature = "io" ,  reason = "awaiting stability of Read::chars" ,  
20822093           issue = "27802" ) ]  
2094+ #[ allow( deprecated) ]  
20832095impl  fmt:: Display  for  CharsError  { 
20842096    fn  fmt ( & self ,  f :  & mut  fmt:: Formatter )  -> fmt:: Result  { 
20852097        match  * self  { 
0 commit comments