Skip to content

Make char::is_private_use and char::is_assigned unstably public#157946

Open
Jules-Bertholet wants to merge 3 commits into
rust-lang:mainfrom
Jules-Bertholet:char-unassigned-private-use
Open

Make char::is_private_use and char::is_assigned unstably public#157946
Jules-Bertholet wants to merge 3 commits into
rust-lang:mainfrom
Jules-Bertholet:char-unassigned-private-use

Conversation

@Jules-Bertholet

@Jules-Bertholet Jules-Bertholet commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

See also #157944, #154849. These functions are used in the implementation of char::escape_debug(), and there's no reason to force crates to duplicate data tables that std has to ship anyway. is_assigned is especially useful because crates relying on the stability guarantees of the other Unicode methods in char may wish to reject unassigned characters where those guarantees do not hold.

I'll add a tracking issue if this is approved.

The is_assigned vs is_unassigned bikeshed probably needs libs-API review before merging?

@rustbot label A-Unicode T-libs-api

r? @Mark-Simulacrum

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue. A-Unicode Area: Unicode T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. labels Jun 15, 2026
@Mark-Simulacrum Mark-Simulacrum added S-waiting-on-t-libs-api Status: Awaiting decision from T-libs-api and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jun 18, 2026
@Mark-Simulacrum

Copy link
Copy Markdown
Member

I'll flag this up for libs-api review on the name (essentially I guess we can view this as an ACP).

@Mark-Simulacrum

Copy link
Copy Markdown
Member

Discussed in libs-api meeting, r=me with a tracking issue added.

@Mark-Simulacrum Mark-Simulacrum added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-t-libs-api Status: Awaiting decision from T-libs-api labels Jun 23, 2026
@Jules-Bertholet

Copy link
Copy Markdown
Contributor Author

Tracking issue: #158322

@rustbot ready

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jun 23, 2026
@Mark-Simulacrum

Copy link
Copy Markdown
Member

@bors r+ rollup

(Squashing in the tracking issue would be nice in the future, but no big deal).

@rust-bors

rust-bors Bot commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 4b62a30 has been approved by Mark-Simulacrum

It is now in the queue for this repository.

🌲 The tree is currently closed for pull requests below priority 5. This pull request will be tested once the tree is reopened.

@rust-bors rust-bors Bot added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jun 24, 2026
jhpratt added a commit to jhpratt/rust that referenced this pull request Jun 24, 2026
…ivate-use, r=Mark-Simulacrum

Make `char::is_private_use` and `char::is_assigned` unstably public

See also rust-lang#157944, rust-lang#154849. These functions are used in the implementation of `char::escape_debug()`, and there's no reason to force crates to duplicate data tables that std has to ship anyway. `is_assigned` is especially useful because crates relying on the stability guarantees of the other Unicode methods in `char` may wish to reject unassigned characters where those guarantees do not hold.

I'll add a tracking issue if this is approved.

The `is_assigned` vs `is_unassigned` bikeshed probably needs libs-API review before merging?

@rustbot label A-Unicode T-libs-api

r? @Mark-Simulacrum
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-Unicode Area: Unicode S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-libs Relevant to the library team, which will review and decide on the PR/issue. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants