Skip to content

Commit b16bad6

Browse files
Rollup merge of rust-lang#52156 - zajlerke:update-deprecation-notice, r=Kimundi
Update std::ascii::ASCIIExt deprecation notes Fixes rust-lang#52085
2 parents 20176fe + 2c2add6 commit b16bad6

File tree

1 file changed

+30
-10
lines changed

1 file changed

+30
-10
lines changed

src/libstd/ascii.rs

+30-10
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,9 @@ pub trait AsciiExt {
163163
/// # Note
164164
///
165165
/// This method will be deprecated in favor of the identically-named
166-
/// inherent methods on `u8`, `char`, `[u8]` and `str`.
166+
/// inherent methods on `u8` and `char`.
167+
/// For `[u8]` use `.iter().all(u8::is_ascii_alphabetic)`.
168+
/// For `str` use `.bytes().all(u8::is_ascii_alphabetic)`.
167169
#[unstable(feature = "ascii_ctype", issue = "39658")]
168170
#[rustc_deprecated(since = "1.26.0", reason = "use inherent methods instead")]
169171
fn is_ascii_alphabetic(&self) -> bool { unimplemented!(); }
@@ -176,7 +178,9 @@ pub trait AsciiExt {
176178
/// # Note
177179
///
178180
/// This method will be deprecated in favor of the identically-named
179-
/// inherent methods on `u8`, `char`, `[u8]` and `str`.
181+
/// inherent methods on `u8` and `char`.
182+
/// For `[u8]` use `.iter().all(u8::is_ascii_uppercase)`.
183+
/// For `str` use `.bytes().all(u8::is_ascii_uppercase)`.
180184
#[unstable(feature = "ascii_ctype", issue = "39658")]
181185
#[rustc_deprecated(since = "1.26.0", reason = "use inherent methods instead")]
182186
fn is_ascii_uppercase(&self) -> bool { unimplemented!(); }
@@ -189,7 +193,9 @@ pub trait AsciiExt {
189193
/// # Note
190194
///
191195
/// This method will be deprecated in favor of the identically-named
192-
/// inherent methods on `u8`, `char`, `[u8]` and `str`.
196+
/// inherent methods on `u8` and `char`.
197+
/// For `[u8]` use `.iter().all(u8::is_ascii_lowercase)`.
198+
/// For `str` use `.bytes().all(u8::is_ascii_lowercase)`.
193199
#[unstable(feature = "ascii_ctype", issue = "39658")]
194200
#[rustc_deprecated(since = "1.26.0", reason = "use inherent methods instead")]
195201
fn is_ascii_lowercase(&self) -> bool { unimplemented!(); }
@@ -203,7 +209,9 @@ pub trait AsciiExt {
203209
/// # Note
204210
///
205211
/// This method will be deprecated in favor of the identically-named
206-
/// inherent methods on `u8`, `char`, `[u8]` and `str`.
212+
/// inherent methods on `u8` and `char`.
213+
/// For `[u8]` use `.iter().all(u8::is_ascii_alphanumeric)`.
214+
/// For `str` use `.bytes().all(u8::is_ascii_alphanumeric)`.
207215
#[unstable(feature = "ascii_ctype", issue = "39658")]
208216
#[rustc_deprecated(since = "1.26.0", reason = "use inherent methods instead")]
209217
fn is_ascii_alphanumeric(&self) -> bool { unimplemented!(); }
@@ -216,7 +224,9 @@ pub trait AsciiExt {
216224
/// # Note
217225
///
218226
/// This method will be deprecated in favor of the identically-named
219-
/// inherent methods on `u8`, `char`, `[u8]` and `str`.
227+
/// inherent methods on `u8` and `char`.
228+
/// For `[u8]` use `.iter().all(u8::is_ascii_digit)`.
229+
/// For `str` use `.bytes().all(u8::is_ascii_digit)`.
220230
#[unstable(feature = "ascii_ctype", issue = "39658")]
221231
#[rustc_deprecated(since = "1.26.0", reason = "use inherent methods instead")]
222232
fn is_ascii_digit(&self) -> bool { unimplemented!(); }
@@ -230,7 +240,9 @@ pub trait AsciiExt {
230240
/// # Note
231241
///
232242
/// This method will be deprecated in favor of the identically-named
233-
/// inherent methods on `u8`, `char`, `[u8]` and `str`.
243+
/// inherent methods on `u8` and `char`.
244+
/// For `[u8]` use `.iter().all(u8::is_ascii_hexdigit)`.
245+
/// For `str` use `.bytes().all(u8::is_ascii_hexdigit)`.
234246
#[unstable(feature = "ascii_ctype", issue = "39658")]
235247
#[rustc_deprecated(since = "1.26.0", reason = "use inherent methods instead")]
236248
fn is_ascii_hexdigit(&self) -> bool { unimplemented!(); }
@@ -248,7 +260,9 @@ pub trait AsciiExt {
248260
/// # Note
249261
///
250262
/// This method will be deprecated in favor of the identically-named
251-
/// inherent methods on `u8`, `char`, `[u8]` and `str`.
263+
/// inherent methods on `u8` and `char`.
264+
/// For `[u8]` use `.iter().all(u8::is_ascii_punctuation)`.
265+
/// For `str` use `.bytes().all(u8::is_ascii_punctuation)`.
252266
#[unstable(feature = "ascii_ctype", issue = "39658")]
253267
#[rustc_deprecated(since = "1.26.0", reason = "use inherent methods instead")]
254268
fn is_ascii_punctuation(&self) -> bool { unimplemented!(); }
@@ -261,7 +275,9 @@ pub trait AsciiExt {
261275
/// # Note
262276
///
263277
/// This method will be deprecated in favor of the identically-named
264-
/// inherent methods on `u8`, `char`, `[u8]` and `str`.
278+
/// inherent methods on `u8` and `char`.
279+
/// For `[u8]` use `.iter().all(u8::is_ascii_graphic)`.
280+
/// For `str` use `.bytes().all(u8::is_ascii_graphic)`.
265281
#[unstable(feature = "ascii_ctype", issue = "39658")]
266282
#[rustc_deprecated(since = "1.26.0", reason = "use inherent methods instead")]
267283
fn is_ascii_graphic(&self) -> bool { unimplemented!(); }
@@ -291,7 +307,9 @@ pub trait AsciiExt {
291307
/// # Note
292308
///
293309
/// This method will be deprecated in favor of the identically-named
294-
/// inherent methods on `u8`, `char`, `[u8]` and `str`.
310+
/// inherent methods on `u8` and `char`.
311+
/// For `[u8]` use `.iter().all(u8::is_ascii_whitespace)`.
312+
/// For `str` use `.bytes().all(u8::is_ascii_whitespace)`.
295313
#[unstable(feature = "ascii_ctype", issue = "39658")]
296314
#[rustc_deprecated(since = "1.26.0", reason = "use inherent methods instead")]
297315
fn is_ascii_whitespace(&self) -> bool { unimplemented!(); }
@@ -304,7 +322,9 @@ pub trait AsciiExt {
304322
/// # Note
305323
///
306324
/// This method will be deprecated in favor of the identically-named
307-
/// inherent methods on `u8`, `char`, `[u8]` and `str`.
325+
/// inherent methods on `u8` and `char`.
326+
/// For `[u8]` use `.iter().all(u8::is_ascii_control)`.
327+
/// For `str` use `.bytes().all(u8::is_ascii_control)`.
308328
#[unstable(feature = "ascii_ctype", issue = "39658")]
309329
#[rustc_deprecated(since = "1.26.0", reason = "use inherent methods instead")]
310330
fn is_ascii_control(&self) -> bool { unimplemented!(); }

0 commit comments

Comments
 (0)