- 
                Notifications
    You must be signed in to change notification settings 
- Fork 13.9k
          Use create_snapshot_for_diagnostic instead of clone for Parser
          #98020
        
          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
  
    Use create_snapshot_for_diagnostic instead of clone for Parser
  
  #98020
              Conversation
| r? @jackh726 (rust-highfive has picked a reviewer for you, use r? to override) | 
| @bors r+ | 
| 📌 Commit 84a13a2 has been approved by  | 
…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.
| ☀️ Test successful - checks-actions | 
| Finished benchmarking commit (1fb9603): comparison url. Instruction count
 
 Max RSS (memory usage)Results
 
 CyclesThis 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 | 
…agnostic, r=cjgillot Use `create_snapshot_for_diagnostic` instead of `clone` for `Parser` follow-up to rust-lang#98020
Use
create_snapshot_for_diagnosticI implemented in #94731 instead ofcloneto avoid duplicate unclosed delims errors being emitted when theParseris dropped. I missed this one in #95068.