-
Notifications
You must be signed in to change notification settings - Fork 13.7k
Hard-code char::is_control
#145479
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Kmeakin
wants to merge
1
commit into
rust-lang:master
Choose a base branch
from
Kmeakin:km/hardcode-char-is-control
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Hard-code char::is_control
#145479
+5
−28
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
According to https://www.unicode.org/policies/stability_policy.html#Property_Value, the set of codepoints in `Cc` will never change. So we can hard-code the patterns to match against instead of using a table.
|
jhpratt
added a commit
to jhpratt/rust
that referenced
this pull request
Aug 17, 2025
Fix `unicode_data.rs` mention message The [previous message](rust-lang#145479 (comment)) was weirdly formatted, let's render it properly.
jhpratt
added a commit
to jhpratt/rust
that referenced
this pull request
Aug 17, 2025
Fix `unicode_data.rs` mention message The [previous message](rust-lang#145479 (comment)) was weirdly formatted, let's render it properly.
Zalathar
added a commit
to Zalathar/rust
that referenced
this pull request
Aug 18, 2025
Fix `unicode_data.rs` mention message The [previous message](rust-lang#145479 (comment)) was weirdly formatted, let's render it properly.
Zalathar
added a commit
to Zalathar/rust
that referenced
this pull request
Aug 18, 2025
Fix `unicode_data.rs` mention message The [previous message](rust-lang#145479 (comment)) was weirdly formatted, let's render it properly.
jhpratt
added a commit
to jhpratt/rust
that referenced
this pull request
Aug 18, 2025
Fix `unicode_data.rs` mention message The [previous message](rust-lang#145479 (comment)) was weirdly formatted, let's render it properly.
jhpratt
added a commit
to jhpratt/rust
that referenced
this pull request
Aug 18, 2025
Fix `unicode_data.rs` mention message The [previous message](rust-lang#145479 (comment)) was weirdly formatted, let's render it properly.
jieyouxu
added a commit
to jieyouxu/rust
that referenced
this pull request
Aug 19, 2025
Fix `unicode_data.rs` mention message The [previous message](rust-lang#145479 (comment)) was weirdly formatted, let's render it properly.
rust-timer
added a commit
that referenced
this pull request
Aug 19, 2025
Rollup merge of #145486 - Urgau:unicode-mention, r=lqd Fix `unicode_data.rs` mention message The [previous message](#145479 (comment)) was weirdly formatted, let's render it properly.
github-actions bot
pushed a commit
to rust-lang/miri
that referenced
this pull request
Aug 20, 2025
Fix `unicode_data.rs` mention message The [previous message](rust-lang/rust#145479 (comment)) was weirdly formatted, let's render it properly.
github-actions bot
pushed a commit
to rust-lang/rustc-dev-guide
that referenced
this pull request
Aug 25, 2025
Fix `unicode_data.rs` mention message The [previous message](rust-lang/rust#145479 (comment)) was weirdly formatted, let's render it properly.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Split off from #145219
According to
https://www.unicode.org/policies/stability_policy.html#Property_Value, the set of codepoints in
Cc
will never change. So we can hard-code the patterns to match against instead of using a table.This doesn't change the generated assembly, since the lookup table is small enough that LLVM is able to inline the whole search. But this does reduce the chance of regressions if LLVM's heuristics change in the future, and means less generated Rust code checked in to
unicode-data.rs
.