Skip to content

Tracking Issue for deprecating std::ascii module #93887

Closed
@clarfonthey

Description

@clarfonthey

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:

  1. trait AsciiExt (already deprecated)
  2. fn escape_default(b: u8) -> std::ascii::EscapeDefault (now duplicated by inherent u8::escape_ascii)
  3. struct EscapeDefault (impl Iterator return value for escape_default, not re-exported anywhere)

The deprecation would involve:

  1. Deprecating fn escape_default (already moved to u8::escape_ascii)
  2. Re-exporting struct EscapeDefault somewhere else, presumably in std::num
  3. Deprecating struct EscapeDefault after its re-export is made stable
  4. 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?)

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCT-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions