@@ -52,6 +52,7 @@ pub use core::ascii::{EscapeDefault, escape_default};
5252///
5353/// [combining character]: https://en.wikipedia.org/wiki/Combining_character
5454#[ stable( feature = "rust1" , since = "1.0.0" ) ]
55+ #[ rustc_deprecated( since = "1.26.0" , reason = "use inherent methods instead" ) ]
5556pub trait AsciiExt {
5657 /// Container type for copied ASCII characters.
5758 #[ stable( feature = "rust1" , since = "1.0.0" ) ]
@@ -84,6 +85,7 @@ pub trait AsciiExt {
8485 /// [`make_ascii_uppercase`]: #tymethod.make_ascii_uppercase
8586 /// [`str::to_uppercase`]: ../primitive.str.html#method.to_uppercase
8687 #[ stable( feature = "rust1" , since = "1.0.0" ) ]
88+ #[ allow( deprecated) ]
8789 fn to_ascii_uppercase ( & self ) -> Self :: Owned ;
8890
8991 /// Makes a copy of the value in its ASCII lower case equivalent.
@@ -104,6 +106,7 @@ pub trait AsciiExt {
104106 /// [`make_ascii_lowercase`]: #tymethod.make_ascii_lowercase
105107 /// [`str::to_lowercase`]: ../primitive.str.html#method.to_lowercase
106108 #[ stable( feature = "rust1" , since = "1.0.0" ) ]
109+ #[ allow( deprecated) ]
107110 fn to_ascii_lowercase ( & self ) -> Self :: Owned ;
108111
109112 /// Checks that two values are an ASCII case-insensitive match.
@@ -162,6 +165,7 @@ pub trait AsciiExt {
162165 /// This method will be deprecated in favor of the identically-named
163166 /// inherent methods on `u8`, `char`, `[u8]` and `str`.
164167 #[ unstable( feature = "ascii_ctype" , issue = "39658" ) ]
168+ #[ rustc_deprecated( since = "1.26.0" , reason = "use inherent methods instead" ) ]
165169 fn is_ascii_alphabetic ( & self ) -> bool { unimplemented ! ( ) ; }
166170
167171 /// Checks if the value is an ASCII uppercase character:
@@ -174,6 +178,7 @@ pub trait AsciiExt {
174178 /// This method will be deprecated in favor of the identically-named
175179 /// inherent methods on `u8`, `char`, `[u8]` and `str`.
176180 #[ unstable( feature = "ascii_ctype" , issue = "39658" ) ]
181+ #[ rustc_deprecated( since = "1.26.0" , reason = "use inherent methods instead" ) ]
177182 fn is_ascii_uppercase ( & self ) -> bool { unimplemented ! ( ) ; }
178183
179184 /// Checks if the value is an ASCII lowercase character:
@@ -186,6 +191,7 @@ pub trait AsciiExt {
186191 /// This method will be deprecated in favor of the identically-named
187192 /// inherent methods on `u8`, `char`, `[u8]` and `str`.
188193 #[ unstable( feature = "ascii_ctype" , issue = "39658" ) ]
194+ #[ rustc_deprecated( since = "1.26.0" , reason = "use inherent methods instead" ) ]
189195 fn is_ascii_lowercase ( & self ) -> bool { unimplemented ! ( ) ; }
190196
191197 /// Checks if the value is an ASCII alphanumeric character:
@@ -199,6 +205,7 @@ pub trait AsciiExt {
199205 /// This method will be deprecated in favor of the identically-named
200206 /// inherent methods on `u8`, `char`, `[u8]` and `str`.
201207 #[ unstable( feature = "ascii_ctype" , issue = "39658" ) ]
208+ #[ rustc_deprecated( since = "1.26.0" , reason = "use inherent methods instead" ) ]
202209 fn is_ascii_alphanumeric ( & self ) -> bool { unimplemented ! ( ) ; }
203210
204211 /// Checks if the value is an ASCII decimal digit:
@@ -211,6 +218,7 @@ pub trait AsciiExt {
211218 /// This method will be deprecated in favor of the identically-named
212219 /// inherent methods on `u8`, `char`, `[u8]` and `str`.
213220 #[ unstable( feature = "ascii_ctype" , issue = "39658" ) ]
221+ #[ rustc_deprecated( since = "1.26.0" , reason = "use inherent methods instead" ) ]
214222 fn is_ascii_digit ( & self ) -> bool { unimplemented ! ( ) ; }
215223
216224 /// Checks if the value is an ASCII hexadecimal digit:
@@ -224,6 +232,7 @@ pub trait AsciiExt {
224232 /// This method will be deprecated in favor of the identically-named
225233 /// inherent methods on `u8`, `char`, `[u8]` and `str`.
226234 #[ unstable( feature = "ascii_ctype" , issue = "39658" ) ]
235+ #[ rustc_deprecated( since = "1.26.0" , reason = "use inherent methods instead" ) ]
227236 fn is_ascii_hexdigit ( & self ) -> bool { unimplemented ! ( ) ; }
228237
229238 /// Checks if the value is an ASCII punctuation character:
@@ -241,6 +250,7 @@ pub trait AsciiExt {
241250 /// This method will be deprecated in favor of the identically-named
242251 /// inherent methods on `u8`, `char`, `[u8]` and `str`.
243252 #[ unstable( feature = "ascii_ctype" , issue = "39658" ) ]
253+ #[ rustc_deprecated( since = "1.26.0" , reason = "use inherent methods instead" ) ]
244254 fn is_ascii_punctuation ( & self ) -> bool { unimplemented ! ( ) ; }
245255
246256 /// Checks if the value is an ASCII graphic character:
@@ -253,6 +263,7 @@ pub trait AsciiExt {
253263 /// This method will be deprecated in favor of the identically-named
254264 /// inherent methods on `u8`, `char`, `[u8]` and `str`.
255265 #[ unstable( feature = "ascii_ctype" , issue = "39658" ) ]
266+ #[ rustc_deprecated( since = "1.26.0" , reason = "use inherent methods instead" ) ]
256267 fn is_ascii_graphic ( & self ) -> bool { unimplemented ! ( ) ; }
257268
258269 /// Checks if the value is an ASCII whitespace character:
@@ -282,6 +293,7 @@ pub trait AsciiExt {
282293 /// This method will be deprecated in favor of the identically-named
283294 /// inherent methods on `u8`, `char`, `[u8]` and `str`.
284295 #[ unstable( feature = "ascii_ctype" , issue = "39658" ) ]
296+ #[ rustc_deprecated( since = "1.26.0" , reason = "use inherent methods instead" ) ]
285297 fn is_ascii_whitespace ( & self ) -> bool { unimplemented ! ( ) ; }
286298
287299 /// Checks if the value is an ASCII control character:
@@ -294,6 +306,7 @@ pub trait AsciiExt {
294306 /// This method will be deprecated in favor of the identically-named
295307 /// inherent methods on `u8`, `char`, `[u8]` and `str`.
296308 #[ unstable( feature = "ascii_ctype" , issue = "39658" ) ]
309+ #[ rustc_deprecated( since = "1.26.0" , reason = "use inherent methods instead" ) ]
297310 fn is_ascii_control ( & self ) -> bool { unimplemented ! ( ) ; }
298311}
299312
@@ -354,6 +367,7 @@ macro_rules! delegating_ascii_ctype_methods {
354367}
355368
356369#[ stable( feature = "rust1" , since = "1.0.0" ) ]
370+ #[ allow( deprecated) ]
357371impl AsciiExt for u8 {
358372 type Owned = u8 ;
359373
@@ -362,6 +376,7 @@ impl AsciiExt for u8 {
362376}
363377
364378#[ stable( feature = "rust1" , since = "1.0.0" ) ]
379+ #[ allow( deprecated) ]
365380impl AsciiExt for char {
366381 type Owned = char ;
367382
@@ -370,6 +385,7 @@ impl AsciiExt for char {
370385}
371386
372387#[ stable( feature = "rust1" , since = "1.0.0" ) ]
388+ #[ allow( deprecated) ]
373389impl AsciiExt for [ u8 ] {
374390 type Owned = Vec < u8 > ;
375391
@@ -427,6 +443,7 @@ impl AsciiExt for [u8] {
427443}
428444
429445#[ stable( feature = "rust1" , since = "1.0.0" ) ]
446+ #[ allow( deprecated) ]
430447impl AsciiExt for str {
431448 type Owned = String ;
432449
0 commit comments