This is a separate issue to track the potential deprecation of the std::ascii, alloc::ascii, and core::ascii modules, separated from #77174 per this comment. This issue will just say std::ascii for simplicity since, excluding the already-deprecated AsciiExt trait, these three modules are identical.
Public API
Right now, std::ascii contains the following APIs:
trait AsciiExt (already deprecated)
fn escape_default(b: u8) -> std::ascii::EscapeDefault (now duplicated by inherent u8::escape_ascii)
struct EscapeDefault (impl Iterator return value for escape_default, not re-exported anywhere)
The deprecation would involve:
- Deprecating
fn escape_default (already moved to u8::escape_ascii)
- Re-exporting
struct EscapeDefault somewhere else, presumably in std::num
- Deprecating
struct EscapeDefault after its re-export is made stable
- Deprecating the entire
std::ascii module
Steps / History
Some of these may involve separate FCPs:
Unresolved Questions
- Where should
std::ascii::EscapeDefault be moved to? std::num::EscapeAscii seems the most logical, but there could be other options.
- What effects would this have on the larger ecosystem? (crater runs?)
This is a separate issue to track the potential deprecation of the
std::ascii,alloc::ascii, andcore::asciimodules, separated from #77174 per this comment. This issue will just saystd::asciifor simplicity since, excluding the already-deprecatedAsciiExttrait, these three modules are identical.Public API
Right now,
std::asciicontains the following APIs:trait AsciiExt(already deprecated)fn escape_default(b: u8) -> std::ascii::EscapeDefault(now duplicated by inherentu8::escape_ascii)struct EscapeDefault(impl Iteratorreturn value forescape_default, not re-exported anywhere)The deprecation would involve:
fn escape_default(already moved tou8::escape_ascii)struct EscapeDefaultsomewhere else, presumably instd::numstruct EscapeDefaultafter its re-export is made stablestd::asciimoduleSteps / History
Some of these may involve separate FCPs:
std::ascii::AsciiExt: Deprecate the AsciiExt trait in favor of inherent methods #49109u8::escape_ascii: Tracking Issue for inherent_ascii_escape #77174std::ascii::escape_default(not yet)std::ascii::EscapeDefault(not yet)std::ascii::EscapeDefault(not yet)std::asciimodule (not yet)Unresolved Questions
std::ascii::EscapeDefaultbe moved to?std::num::EscapeAsciiseems the most logical, but there could be other options.