-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Unescaping cleanups #118734
Merged
Merged
Unescaping cleanups #118734
Conversation
This file contains 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
Raw strings (of all kinds) don't support escapes, so this function should never be called on them.
rustbot
added
S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
labels
Dec 8, 2023
fee1-dead
reviewed
Dec 8, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
overall lgtm, had a nit and a comment about the change back to Mode
again
The fallback `_` case works for these chars, no need to treat them specially.
These don't really make sense since C string literals were added. This commit removes them in favour for `mode: Mode` args. `ascii_check` still has a `characters_should_be_ascii: bool` arg. Also, `characters_should_be_ascii` is renamed to be shorter.
The `empty!` macro calls should be outside the `cfg(FALSE)` function.
- Add `use Mode::*` to avoid all the qualifiers. - Reorder the variants. The existing order makes no particular sense, which has bugged me for some time. I've chosen an order that makes sense to me.
nnethercote
force-pushed
the
literal-cleanups
branch
from
December 8, 2023 22:57
1d031fa
to
0a401b6
Compare
Thanks for the fast review. I addressed the nits. @bors r=fee1-dead |
bors
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
Dec 8, 2023
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Dec 9, 2023
…llaumeGomez Rollup of 6 pull requests Successful merges: - rust-lang#117953 (Add more SIMD platform-intrinsics) - rust-lang#118057 (dedup for duplicate suggestions) - rust-lang#118638 (More `rustc_mir_dataflow` cleanups) - rust-lang#118702 (Strengthen well known check-cfg names and values test) - rust-lang#118734 (Unescaping cleanups) - rust-lang#118766 (Lower some forgotten spans) r? `@ghost` `@rustbot` modify labels: rollup
rust-timer
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Dec 9, 2023
Rollup merge of rust-lang#118734 - nnethercote:literal-cleanups, r=fee1-dead Unescaping cleanups Minor improvements I found while working on rust-lang#118699. r? `@fee1-dead`
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
T-compiler
Relevant to the compiler 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.
Minor improvements I found while working on #118699.
r? @fee1-dead