@@ -52,6 +52,7 @@ pub use core::ascii::{EscapeDefault, escape_default};
52
52
///
53
53
/// [combining character]: https://en.wikipedia.org/wiki/Combining_character
54
54
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
55
+ #[ rustc_deprecated( since = "1.26.0" , reason = "use inherent methods instead" ) ]
55
56
pub trait AsciiExt {
56
57
/// Container type for copied ASCII characters.
57
58
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
@@ -84,6 +85,7 @@ pub trait AsciiExt {
84
85
/// [`make_ascii_uppercase`]: #tymethod.make_ascii_uppercase
85
86
/// [`str::to_uppercase`]: ../primitive.str.html#method.to_uppercase
86
87
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
88
+ #[ allow( deprecated) ]
87
89
fn to_ascii_uppercase ( & self ) -> Self :: Owned ;
88
90
89
91
/// Makes a copy of the value in its ASCII lower case equivalent.
@@ -104,6 +106,7 @@ pub trait AsciiExt {
104
106
/// [`make_ascii_lowercase`]: #tymethod.make_ascii_lowercase
105
107
/// [`str::to_lowercase`]: ../primitive.str.html#method.to_lowercase
106
108
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
109
+ #[ allow( deprecated) ]
107
110
fn to_ascii_lowercase ( & self ) -> Self :: Owned ;
108
111
109
112
/// Checks that two values are an ASCII case-insensitive match.
@@ -162,6 +165,7 @@ pub trait AsciiExt {
162
165
/// This method will be deprecated in favor of the identically-named
163
166
/// inherent methods on `u8`, `char`, `[u8]` and `str`.
164
167
#[ unstable( feature = "ascii_ctype" , issue = "39658" ) ]
168
+ #[ rustc_deprecated( since = "1.26.0" , reason = "use inherent methods instead" ) ]
165
169
fn is_ascii_alphabetic ( & self ) -> bool { unimplemented ! ( ) ; }
166
170
167
171
/// Checks if the value is an ASCII uppercase character:
@@ -174,6 +178,7 @@ pub trait AsciiExt {
174
178
/// This method will be deprecated in favor of the identically-named
175
179
/// inherent methods on `u8`, `char`, `[u8]` and `str`.
176
180
#[ unstable( feature = "ascii_ctype" , issue = "39658" ) ]
181
+ #[ rustc_deprecated( since = "1.26.0" , reason = "use inherent methods instead" ) ]
177
182
fn is_ascii_uppercase ( & self ) -> bool { unimplemented ! ( ) ; }
178
183
179
184
/// Checks if the value is an ASCII lowercase character:
@@ -186,6 +191,7 @@ pub trait AsciiExt {
186
191
/// This method will be deprecated in favor of the identically-named
187
192
/// inherent methods on `u8`, `char`, `[u8]` and `str`.
188
193
#[ unstable( feature = "ascii_ctype" , issue = "39658" ) ]
194
+ #[ rustc_deprecated( since = "1.26.0" , reason = "use inherent methods instead" ) ]
189
195
fn is_ascii_lowercase ( & self ) -> bool { unimplemented ! ( ) ; }
190
196
191
197
/// Checks if the value is an ASCII alphanumeric character:
@@ -199,6 +205,7 @@ pub trait AsciiExt {
199
205
/// This method will be deprecated in favor of the identically-named
200
206
/// inherent methods on `u8`, `char`, `[u8]` and `str`.
201
207
#[ unstable( feature = "ascii_ctype" , issue = "39658" ) ]
208
+ #[ rustc_deprecated( since = "1.26.0" , reason = "use inherent methods instead" ) ]
202
209
fn is_ascii_alphanumeric ( & self ) -> bool { unimplemented ! ( ) ; }
203
210
204
211
/// Checks if the value is an ASCII decimal digit:
@@ -211,6 +218,7 @@ pub trait AsciiExt {
211
218
/// This method will be deprecated in favor of the identically-named
212
219
/// inherent methods on `u8`, `char`, `[u8]` and `str`.
213
220
#[ unstable( feature = "ascii_ctype" , issue = "39658" ) ]
221
+ #[ rustc_deprecated( since = "1.26.0" , reason = "use inherent methods instead" ) ]
214
222
fn is_ascii_digit ( & self ) -> bool { unimplemented ! ( ) ; }
215
223
216
224
/// Checks if the value is an ASCII hexadecimal digit:
@@ -224,6 +232,7 @@ pub trait AsciiExt {
224
232
/// This method will be deprecated in favor of the identically-named
225
233
/// inherent methods on `u8`, `char`, `[u8]` and `str`.
226
234
#[ unstable( feature = "ascii_ctype" , issue = "39658" ) ]
235
+ #[ rustc_deprecated( since = "1.26.0" , reason = "use inherent methods instead" ) ]
227
236
fn is_ascii_hexdigit ( & self ) -> bool { unimplemented ! ( ) ; }
228
237
229
238
/// Checks if the value is an ASCII punctuation character:
@@ -241,6 +250,7 @@ pub trait AsciiExt {
241
250
/// This method will be deprecated in favor of the identically-named
242
251
/// inherent methods on `u8`, `char`, `[u8]` and `str`.
243
252
#[ unstable( feature = "ascii_ctype" , issue = "39658" ) ]
253
+ #[ rustc_deprecated( since = "1.26.0" , reason = "use inherent methods instead" ) ]
244
254
fn is_ascii_punctuation ( & self ) -> bool { unimplemented ! ( ) ; }
245
255
246
256
/// Checks if the value is an ASCII graphic character:
@@ -253,6 +263,7 @@ pub trait AsciiExt {
253
263
/// This method will be deprecated in favor of the identically-named
254
264
/// inherent methods on `u8`, `char`, `[u8]` and `str`.
255
265
#[ unstable( feature = "ascii_ctype" , issue = "39658" ) ]
266
+ #[ rustc_deprecated( since = "1.26.0" , reason = "use inherent methods instead" ) ]
256
267
fn is_ascii_graphic ( & self ) -> bool { unimplemented ! ( ) ; }
257
268
258
269
/// Checks if the value is an ASCII whitespace character:
@@ -282,6 +293,7 @@ pub trait AsciiExt {
282
293
/// This method will be deprecated in favor of the identically-named
283
294
/// inherent methods on `u8`, `char`, `[u8]` and `str`.
284
295
#[ unstable( feature = "ascii_ctype" , issue = "39658" ) ]
296
+ #[ rustc_deprecated( since = "1.26.0" , reason = "use inherent methods instead" ) ]
285
297
fn is_ascii_whitespace ( & self ) -> bool { unimplemented ! ( ) ; }
286
298
287
299
/// Checks if the value is an ASCII control character:
@@ -294,6 +306,7 @@ pub trait AsciiExt {
294
306
/// This method will be deprecated in favor of the identically-named
295
307
/// inherent methods on `u8`, `char`, `[u8]` and `str`.
296
308
#[ unstable( feature = "ascii_ctype" , issue = "39658" ) ]
309
+ #[ rustc_deprecated( since = "1.26.0" , reason = "use inherent methods instead" ) ]
297
310
fn is_ascii_control ( & self ) -> bool { unimplemented ! ( ) ; }
298
311
}
299
312
@@ -354,6 +367,7 @@ macro_rules! delegating_ascii_ctype_methods {
354
367
}
355
368
356
369
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
370
+ #[ allow( deprecated) ]
357
371
impl AsciiExt for u8 {
358
372
type Owned = u8 ;
359
373
@@ -362,6 +376,7 @@ impl AsciiExt for u8 {
362
376
}
363
377
364
378
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
379
+ #[ allow( deprecated) ]
365
380
impl AsciiExt for char {
366
381
type Owned = char ;
367
382
@@ -370,6 +385,7 @@ impl AsciiExt for char {
370
385
}
371
386
372
387
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
388
+ #[ allow( deprecated) ]
373
389
impl AsciiExt for [ u8 ] {
374
390
type Owned = Vec < u8 > ;
375
391
@@ -427,6 +443,7 @@ impl AsciiExt for [u8] {
427
443
}
428
444
429
445
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
446
+ #[ allow( deprecated) ]
430
447
impl AsciiExt for str {
431
448
type Owned = String ;
432
449
0 commit comments