Skip to content

Use create_snapshot_for_diagnostic instead of clone for Parser #98020

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

Conversation

TaKO8Ki
Copy link
Member

@TaKO8Ki TaKO8Ki commented Jun 12, 2022

Use create_snapshot_for_diagnostic I implemented in #94731 instead of clone to avoid duplicate unclosed delims errors being emitted when the Parser is dropped. I missed this one in #95068.

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

r? @jackh726

(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 Jun 12, 2022
@Dylan-DPC
Copy link
Member

@bors r+

@bors
Copy link
Collaborator

bors commented Jun 12, 2022

📌 Commit 84a13a2 has been approved by Dylan-DPC

@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 Jun 12, 2022
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
Copy link
Collaborator

bors commented Jun 12, 2022

⌛ Testing commit 84a13a2 with merge 1fb9603...

@bors
Copy link
Collaborator

bors commented Jun 13, 2022

☀️ Test successful - checks-actions
Approved by: Dylan-DPC
Pushing 1fb9603 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Jun 13, 2022
@bors bors merged commit 1fb9603 into rust-lang:master Jun 13, 2022
@rustbot rustbot added this to the 1.63.0 milestone Jun 13, 2022
@TaKO8Ki TaKO8Ki deleted the use-create-snapshot-for-diagnostic-in-rustc-expand branch June 13, 2022 02:20
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (1fb9603): comparison url.

Instruction count

  • Primary benchmarks: 🎉 relevant improvement found
  • Secondary benchmarks: no relevant changes found
mean1 max count2
Regressions 😿
(primary)
N/A N/A 0
Regressions 😿
(secondary)
N/A N/A 0
Improvements 🎉
(primary)
-0.8% -0.8% 1
Improvements 🎉
(secondary)
N/A N/A 0
All 😿🎉 (primary) -0.8% -0.8% 1

Max RSS (memory usage)

Results
  • Primary benchmarks: 🎉 relevant improvement found
  • Secondary benchmarks: 🎉 relevant improvement found
mean1 max count2
Regressions 😿
(primary)
N/A N/A 0
Regressions 😿
(secondary)
N/A N/A 0
Improvements 🎉
(primary)
-2.6% -2.6% 1
Improvements 🎉
(secondary)
-2.7% -2.7% 1
All 😿🎉 (primary) -2.6% -2.6% 1

Cycles

This benchmark run did not return any relevant results for this metric.

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

@rustbot label: -perf-regression

Footnotes

  1. the arithmetic mean of the percent change 2

  2. number of relevant changes 2

matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Aug 15, 2022
…agnostic, r=cjgillot

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

follow-up to rust-lang#98020
# 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.

7 participants