rust/library/core/src/slice
Matthias Krüger ea0b6504fa
Rollup merge of #111009 - scottmcm:ascii-char, r=BurntSushi
Add `ascii::Char` (ACP#179)

ACP second: https://github.com/rust-lang/libs-team/issues/179#issuecomment-1527900570
New tracking issue: https://github.com/rust-lang/rust/issues/110998

For now this is an `enum` as `@kupiakos` [suggested](https://github.com/rust-lang/libs-team/issues/179#issuecomment-1527959724), with the variants under a different feature flag.

There's lots more things that could be added here, and place for further doc updates, but this seems like a plausible starting point PR.

I've gone through and put an `as_ascii` next to every `is_ascii`: on `u8`, `char`, `[u8]`, and `str`.

As a demonstration, made a commit updating some formatting code to use this: https://github.com/scottmcm/rust/commit/ascii-char-in-fmt (I don't want to include that in this PR, though, because that brings in perf questions that don't exist if this is just adding new unstable APIs.)
2023-05-04 19:18:21 +02:00
..
iter replace version placeholders 2023-04-28 08:47:55 -07:00
ascii.rs Add the basic ascii::Char type 2023-05-03 22:09:33 -07:00
cmp.rs Merge two different equality specialization traits in core 2023-03-01 14:42:06 -08:00
index.rs rm const traits in libcore 2023-04-16 06:49:27 +00:00
iter.rs Improve internal field comments on slice::Iter(Mut) 2023-04-29 12:50:53 -07:00
memchr.rs fix tidy 2023-04-16 07:27:28 +00:00
mod.rs Constify slice flatten method 2023-05-03 12:33:15 +02:00
raw.rs Print the precondition we violated, and visible through output capture 2022-10-26 22:09:17 -04:00
rotate.rs Make ZST checks in core/alloc more readable 2022-09-22 23:12:29 -07:00
sort.rs Fix no_global_oom_handling build 2023-04-21 10:45:06 -05:00
specialize.rs Remove size_of == 1 case from fill specialization. 2021-08-09 19:25:28 +02:00