Skip to content
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

Fix span for unicode escape suggestion. #77587

Merged
merged 1 commit into from
Oct 6, 2020

Conversation

ehuss
Copy link
Contributor

@ehuss ehuss commented Oct 5, 2020

If a unicode escape is missing the curly braces, the suggested fix is to add the curly braces, but the span for the fix was incorrect. It was not covering the \u, but the suggested text includes the \u, causing the resulting fix to be "\u\u{1234}". This changes it so that the span includes the \u. An alternate fix would be to remove \u from the suggested fix, but I think the error message reads better if the entire escape is included.

@rust-highfive
Copy link
Collaborator

r? @ecstatic-morse

(rust_highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Oct 5, 2020
@ecstatic-morse
Copy link
Contributor

LGTM

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Oct 5, 2020

📌 Commit 35192ff has been approved by ecstatic-morse

@bors 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 Oct 5, 2020
bors added a commit to rust-lang-ci/rust that referenced this pull request Oct 6, 2020
Rollup of 13 pull requests

Successful merges:

 - rust-lang#76388 (Add a note about the panic behavior of math operations on time objects)
 - rust-lang#76855 (Revamp rustdoc docs about documentation using `cfg`)
 - rust-lang#76995 (Reduce boilerplate with the matches! macro)
 - rust-lang#77228 (Add missing examples for MaybeUninit)
 - rust-lang#77528 (Avoid unchecked casts in net parser)
 - rust-lang#77534 (Disallow overriding forbid in same scope)
 - rust-lang#77555 (Allow anyone to set regression labels)
 - rust-lang#77558 (Rename bootstrap/defaults/{config.toml.PROFILE => config.PROFILE.toml})
 - rust-lang#77559 (Fix rustdoc warnings about invalid Rust syntax)
 - rust-lang#77560 (Fix LitKind's byte buffer to use refcounted slice)
 - rust-lang#77573 (Hint doc use convert::identity relative link)
 - rust-lang#77587 (Fix span for unicode escape suggestion.)
 - rust-lang#77591 (Record `expansion_that_defined` into crate metadata)

Failed merges:

r? `@ghost`
@bors bors merged commit cc908f3 into rust-lang:master Oct 6, 2020
@rustbot rustbot added this to the 1.49.0 milestone Oct 6, 2020
This pull request was closed.
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants