Uh oh!
There was an error while loading. Please reload this page.
Add ASCII-related methods from u8 and MIN/MAX to core::ascii::Char - #143467
Conversation
rustbot
commented
Jul 5, 2025
r? @ibraheemdev rustbot has assigned @ibraheemdev. Use |
ibraheemdev
commented
Jul 5, 2025
r? libs-api |
Suggested an ACP on Zulip. A few notes
|
tgross35
commented
Aug 5, 2025
ACP was accepted with changes, for that: r? tgross35 |
rustbot
commented
Aug 5, 2025
Reminder, once the PR becomes ready for a review, use |
This comment has been minimized.
This comment has been minimized.
381b5b3 to
16b8f73Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
67cd427 to
d811581CompareChaiTRex
commented
Aug 6, 2025
@rustbot ready |
| without modifying the original"] | ||
| #[unstable(feature = "ascii_char", issue = "110998")] | ||
| #[inline] | ||
| pub fn escape_ascii(self) -> super::EscapeDefault { |
There was a problem hiding this comment.
Just noting that the function on char is called escape_unicode, so keeping ascii in the name seems fine here
There was a problem hiding this comment.
To add to that, I left that in for that reason and also because it clearly distinguishes its use of ASCII escapes (\x04) rather than Unicode escapes (\u{4}). I should probably better document what output should be expected for that particular character by adding a few lines to the doctest in another pull request.
tgross35
commented
Aug 13, 2025
Looks good, thank you! @bors r+ rollup |
bors
commented
Aug 13, 2025
Rollup of 11 pull requests Successful merges: - #143467 (Add ASCII-related methods from `u8` and `MIN`/`MAX` to `core::ascii::Char`) - #144519 (Constify `SystemTime` methods) - #144642 (editorconfig: don't trim trailing whitespace in tests) - #144870 (Stabilize `path_file_prefix` feature) - #145269 (Deprecate RUST_TEST_* env variables) - #145274 (Remove unused `#[must_use]`) - #145289 (chore(ci): upgrade checkout to v5) - #145303 (Docs: Link to payload_as_str() from payload().) - #145308 (Adjust documentation of `dangling`) - #145320 (Allow cross-compiling the Cranelift dist component) - #145325 (Add `cast_init` and `cast_uninit` methods for pointers) r? `@ghost` `@rustbot` modify labels: rollup
Uh oh!
There was an error while loading. Please reload this page.
Rollup merge of #143467 - ChaiTRex:ascii_char_is_ascii, r=tgross35 Add ASCII-related methods from `u8` and `MIN`/`MAX` to `core::ascii::Char` * Add ASCII-related methods from `u8` to `core::ascii::Char`. * Add `core::ascii::Char::MIN` and `core::ascii::Char::MAX`.
…ross35 Add ASCII-related methods from `u8` and `MIN`/`MAX` to `core::ascii::Char` * Add ASCII-related methods from `u8` to `core::ascii::Char`. * Add `core::ascii::Char::MIN` and `core::ascii::Char::MAX`.
u8tocore::ascii::Char.core::ascii::Char::MINandcore::ascii::Char::MAX.Tracking issue #110998.
Can someone please ping @rust-lang/libs-api? These additions were not in the original ACP (rust-lang/libs-team#179).