Use Parser.create_snapshot_for_diagnostic instead of Parser.clone()#95068
Merged
bors merged 1 commit intorust-lang:masterfrom Mar 18, 2022
Merged
Conversation
Contributor
|
r? @nagisa (rust-highfive has picked a reviewer for you, use r? to override) |
self.create_snapshot_for_diagnostic instead of self.clone()Parser.create_snapshot_for_diagnostic instead of Parser.clone()
Member
Author
|
r? @rust-lang/compiler |
davidtwco
approved these changes
Mar 18, 2022
Member
|
r? @davidtwco @bors r+ |
Collaborator
|
📌 Commit 201a860 has been approved by |
Collaborator
Collaborator
|
☀️ Test successful - checks-actions |
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.
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.
Use
create_snapshot_for_diagnosticI implemented in #94731 instead ofself.clone()to avoid duplicate unclosed delims errors being emitted when theParseris dropped.