Hint on unknown escape of Unicode quotation marks in string literal#156768
Draft
gilescope wants to merge 3 commits into
Draft
Hint on unknown escape of Unicode quotation marks in string literal#156768gilescope wants to merge 3 commits into
gilescope wants to merge 3 commits into
Conversation
This comment has been minimized.
This comment has been minimized.
Fixes rust-lang#128858 Original work by @LFS6502 in PR rust-lang#137067, squashed. Continuation of PR rust-lang#128906. Signed-off-by: Giles Cope <gilescope@gmail.com>
Apply remaining review requests from estebank and Noratrieb on PR rust-lang#137067: - Remove leftover `// lit.replace(...)` development comment - Merge duplicated help+suggestion text by keeping the explanation in `help` and moving the actionable part into `span_suggestion_verbose` - Drop redundant line/column numbers from `//~^ERROR` annotations - Bless stderr (now matches the previously-applied `ASCII` capitalization fix and the zero-width-diacritic caret positions reported by CI) Signed-off-by: Giles Cope <gilescope@gmail.com>
- Suggestion message now reads e.g. "consider writing it as \`\u{2033}\` for clarity"
so the diagnostic itself names the form the user should type, rather than
abstractly referring to "its escaped form".
- Move tests/ui/unicode-quote.{rs,stderr} into tests/ui/parser/ to satisfy
the ui_tests tidy rule (compiler-team#902): ui tests must live under a
meaningful subdirectory.
Signed-off-by: Giles Cope <gilescope@gmail.com>
9c96bca to
adc634c
Compare
Collaborator
|
The job Click to see the possible cause of the failure (guessed by this bot) |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fixes #128858
This finishes off @LFS6502's PR #137067, which had been pre-approved by reviewers pending small follow-ups. Two reviewers (@Noratrieb and @estebank) left a short list of concrete requests; the original author indicated they were "working on this now" on 2025-08-28 but never returned. Picking it up so it can land.
The substantive change (the diagnostic itself) is @LFS6502's work, preserved as a single commit in their authorship. The second commit applies the reviewer asks:
// lit.replace(c, &ec[1..])development comment inunescape_error_reporting.rs(Noratrieb, then re-raised by estebank).help; the action moves intospan_suggestion_verboseso the same text isn't said twice (estebank).//~^ERRORannotations in the UI test (Noratrieb).tests/ui/unicode-quote.stderr— picks up the previously-appliedascii→ASCIIcapitalization fix and the zero-width-diacritic caret-column positions that the rust-log-analyzer flagged on the last CI run.The first commit attributes the original work to @LFS6502 (and the PR description in their original draft credits #128906 as the prior continuation).
r? compiler
Continuation of #137067 (closes #128858).