mirror of
https://github.com/rust-lang/rust.git
synced 2025-10-16 01:06:39 +00:00

Replace `this.clone()` with `this.create_snapshot_for_diagnostic()`
Use [`create_snapshot_for_diagnostic`](cd11905716/compiler/rustc_parse/src/parser/diagnostics.rs (L214-L223)
) I implemented in https://github.com/rust-lang/rust/pull/94731 instead of `this.clone()` to avoid duplicate errors about unclosed delims being emitted when the `Parser` is dropped.