Skip to content

Do not ICE when synthesizing spans falling inside unicode chars - #63508

Merged
bors merged 3 commits into
rust-lang:masterfrom
estebank:compromice
Aug 14, 2019
Merged

Do not ICE when synthesizing spans falling inside unicode chars#63508
bors merged 3 commits into
rust-lang:masterfrom
estebank:compromice

Conversation

@estebank

Copy link
Copy Markdown
Contributor

Fix#61226.

@rust-highfive

Copy link
Copy Markdown
Contributor

r? @eddyb

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

@rust-highfiverust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Aug 13, 2019
@estebankestebank added beta-nominated Nominated for backporting to the compiler in the beta channel. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Aug 13, 2019
@eddyb

Copy link
Copy Markdown
Contributor

r? @petrochenkov or @matklad

@emilyalbini

Copy link
Copy Markdown
Member

This is beta-nominated for 1.38 right?

Comment threadsrc/test/ui/suggestions/issue-61226.stderr Outdated
@estebank

Copy link
Copy Markdown
ContributorAuthor

@pietroalbini correct

Comment threadsrc/libsyntax/source_map.rs Outdated
@petrochenkovpetrochenkov 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-review Status: Awaiting review from the assignee but also interested parties. labels Aug 13, 2019
@ehuss

Copy link
Copy Markdown
Contributor

I'm curious, why not fix SourceMap::next_point to not create invalid spans?

@estebank

Copy link
Copy Markdown
ContributorAuthor

@ehuss That is something we should also do, but given that next_point an such are only used in best effort suggestions for malformed code, I am ok with this mild limitation in order to get rid of the ICE. Ideally this same suggestion could be accomplished without synthesizing spans and those would always be correct.

@ehuss

Copy link
Copy Markdown
Contributor

Ah, makes sense, thanks!

@petrochenkov

Copy link
Copy Markdown
Contributor

@bors r+ rollup

@bors

bors commented Aug 13, 2019

Copy link
Copy Markdown
Collaborator

📌 Commit 84e202e has been approved by petrochenkov

@borsbors 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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Aug 13, 2019
Centril added a commit to Centril/rust that referenced this pull request Aug 14, 2019
Do not ICE when synthesizing spans falling inside unicode chars
Fixrust-lang#61226.
@CentrilCentril mentioned this pull request Aug 14, 2019
bors added a commit that referenced this pull request Aug 14, 2019
Rollup of 17 pull requests
Successful merges:
- #62760 (Deduplicate error messages in `librsctc_mir`)
- #62849 (typeck: Prohibit RPIT types that inherit lifetimes)
- #63383 (`async fn` lifetime elision tests)
- #63421 (Implement Clone, Display for ascii::EscapeDefault)
- #63459 (syntax: account for CVarArgs being in the argument list.)
- #63475 (Bring back suggestion for splitting `<-` into `< -`)
- #63485 (ci: move mirrors to their standalone bucket)
- #63486 (Document `From` trait for `BinaryHeap`)
- #63488 (improve DiagnosticBuilder docs)
- #63493 (Remove unneeded comment in src/libcore/hash/mod.rs)
- #63499 (handle elision in async fn correctly)
- #63501 (use `ParamName` to track in-scope lifetimes instead of Ident)
- #63508 (Do not ICE when synthesizing spans falling inside unicode chars)
- #63511 (ci: add a check for clock drift)
- #63512 (Provide map_ok and map_err method for Poll<Option<Result<T, E>>>)
- #63529 (RELEASES.md: ? is one of three Kleene operators)
- #63530 (Fix typo in error message.)
Failed merges:
r? @ghost
bors added a commit that referenced this pull request Aug 14, 2019
Rollup of 17 pull requests
Successful merges:
- #62760 (Deduplicate error messages in `librsctc_mir`)
- #62849 (typeck: Prohibit RPIT types that inherit lifetimes)
- #63383 (`async fn` lifetime elision tests)
- #63421 (Implement Clone, Display for ascii::EscapeDefault)
- #63459 (syntax: account for CVarArgs being in the argument list.)
- #63475 (Bring back suggestion for splitting `<-` into `< -`)
- #63485 (ci: move mirrors to their standalone bucket)
- #63486 (Document `From` trait for `BinaryHeap`)
- #63488 (improve DiagnosticBuilder docs)
- #63493 (Remove unneeded comment in src/libcore/hash/mod.rs)
- #63499 (handle elision in async fn correctly)
- #63501 (use `ParamName` to track in-scope lifetimes instead of Ident)
- #63508 (Do not ICE when synthesizing spans falling inside unicode chars)
- #63511 (ci: add a check for clock drift)
- #63512 (Provide map_ok and map_err method for Poll<Option<Result<T, E>>>)
- #63529 (RELEASES.md: ? is one of three Kleene operators)
- #63530 (Fix typo in error message.)
Failed merges:
r? @ghost
@bors

bors commented Aug 14, 2019

Copy link
Copy Markdown
Collaborator

☔ The latest upstream changes (presumably #63544) made this pull request unmergeable. Please resolve the merge conflicts.

@borsbors removed the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Aug 14, 2019
@borsbors added the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Aug 14, 2019
@bors
bors merged commit 84e202e into rust-lang:masterAug 14, 2019
@nikomatsakisnikomatsakis added the beta-accepted Accepted for backporting to the compiler in the beta channel. label Aug 15, 2019
@emilyalbiniemilyalbini mentioned this pull request Aug 21, 2019
@emilyalbiniemilyalbini removed the beta-nominated Nominated for backporting to the compiler in the beta channel. label Aug 21, 2019
bors added a commit that referenced this pull request Aug 21, 2019
[beta] Rollup backports
Cherry-picked:
* RELEASES.md: ? is one of three Kleene operators #63529
* Do not ICE when synthesizing spans falling inside unicode chars #63508
* ci: move mirrors to their standalone bucket #63485
r? @ghost
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

beta-acceptedAccepted for backporting to the compiler in the beta channel.S-waiting-on-authorStatus: This is awaiting some action (such as code changes or more information) from the author.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

in comment cause unexpected rustc panic

9 participants

@estebank@rust-highfive@eddyb@emilyalbini@ehuss@petrochenkov@bors@matklad@nikomatsakis