Skip to content

Use Parser.create_snapshot_for_diagnostic instead of Parser.clone() #95068

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 1 commit into from
Mar 18, 2022

Conversation

TaKO8Ki
Copy link
Member

@TaKO8Ki TaKO8Ki commented Mar 18, 2022

Use create_snapshot_for_diagnostic I implemented in #94731 instead of self.clone() to avoid duplicate unclosed delims errors being emitted when the Parser is dropped.

@rustbot rustbot added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Mar 18, 2022
@rust-highfive
Copy link
Contributor

r? @nagisa

(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 Mar 18, 2022
@TaKO8Ki TaKO8Ki changed the title Use self.create_snapshot_for_diagnostic instead of self.clone() Use Parser.create_snapshot_for_diagnostic instead of Parser.clone() Mar 18, 2022
@TaKO8Ki
Copy link
Member Author

TaKO8Ki commented Mar 18, 2022

r? @rust-lang/compiler

@rust-highfive rust-highfive assigned cjgillot and unassigned nagisa Mar 18, 2022
@davidtwco
Copy link
Member

r? @davidtwco

@bors r+

@bors
Copy link
Collaborator

bors commented Mar 18, 2022

📌 Commit 201a860 has been approved by davidtwco

@rust-highfive rust-highfive assigned davidtwco and unassigned cjgillot Mar 18, 2022
@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 Mar 18, 2022
@bors
Copy link
Collaborator

bors commented Mar 18, 2022

⌛ Testing commit 201a860 with merge 1bfe40d...

@bors
Copy link
Collaborator

bors commented Mar 18, 2022

☀️ Test successful - checks-actions
Approved by: davidtwco
Pushing 1bfe40d to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Mar 18, 2022
@bors bors merged commit 1bfe40d into rust-lang:master Mar 18, 2022
@rustbot rustbot added this to the 1.61.0 milestone Mar 18, 2022
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (1bfe40d): comparison url.

Summary: This benchmark run did not return any relevant results. 1 results were found to be statistically significant but too small to be relevant.

If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf.

@rustbot label: -perf-regression

Dylan-DPC added a commit to Dylan-DPC/rust that referenced this pull request Jun 12, 2022
…gnostic-in-rustc-expand, r=Dylan-DPC

Use `create_snapshot_for_diagnostic` instead of `clone` for `Parser`

Use [`create_snapshot_for_diagnostic`](https://github.com/rust-lang/rust/blob/cd119057160cedea245aa2679add56723f3dc784/compiler/rustc_parse/src/parser/diagnostics.rs#L214-L223) I implemented in rust-lang#94731 instead of `clone` to avoid duplicate unclosed delims errors being emitted when the `Parser` is dropped. I missed this one in rust-lang#95068.
bors added a commit to rust-lang-ci/rust that referenced this pull request Jun 12, 2022
…ostic-in-rustc-expand, r=Dylan-DPC

Use `create_snapshot_for_diagnostic` instead of `clone` for `Parser`

Use [`create_snapshot_for_diagnostic`](https://github.com/rust-lang/rust/blob/cd119057160cedea245aa2679add56723f3dc784/compiler/rustc_parse/src/parser/diagnostics.rs#L214-L223) I implemented in rust-lang#94731 instead of `clone` to avoid duplicate unclosed delims errors being emitted when the `Parser` is dropped. I missed this one in rust-lang#95068.
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
merged-by-bors This PR was explicitly merged by bors. 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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants