mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-15 20:45:45 +03:00
1bfe40d11c
Use `Parser.create_snapshot_for_diagnostic` instead of `Parser.clone()` 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 https://github.com/rust-lang/rust/pull/94731 instead of `self.clone()` to avoid duplicate unclosed delims errors being emitted when the `Parser` is dropped.