about summary refs log tree commit diff
path: root/compiler/rustc_parse/src/parser
diff options
context:
space:
mode:
authorTakayuki Maeda <takoyaki0316@gmail.com>2022-06-12 17:27:36 +0900
committerTakayuki Maeda <takoyaki0316@gmail.com>2022-06-12 17:27:36 +0900
commit84a13a28b749eb4765da0918131a47461fb99e3d (patch)
tree4cb935e0193e4e7723484623f117bed2f8719320 /compiler/rustc_parse/src/parser
parent7092d42c04a56378d2e748f98169b728b1f1d5d1 (diff)
downloadrust-84a13a28b749eb4765da0918131a47461fb99e3d.tar.gz
rust-84a13a28b749eb4765da0918131a47461fb99e3d.zip
use `create_snapshot_for_diagnostic` instead of `clone`
Diffstat (limited to 'compiler/rustc_parse/src/parser')
-rw-r--r--compiler/rustc_parse/src/parser/diagnostics.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_parse/src/parser/diagnostics.rs b/compiler/rustc_parse/src/parser/diagnostics.rs
index a4cdfdf55f9..6a44f5d6653 100644
--- a/compiler/rustc_parse/src/parser/diagnostics.rs
+++ b/compiler/rustc_parse/src/parser/diagnostics.rs
@@ -336,7 +336,7 @@ struct InInTypo {
 // SnapshotParser is used to create a snapshot of the parser
 // without causing duplicate errors being emitted when the `Parser`
 // is dropped.
-pub(super) struct SnapshotParser<'a> {
+pub struct SnapshotParser<'a> {
     parser: Parser<'a>,
     unclosed_delims: Vec<UnmatchedBrace>,
 }
@@ -392,7 +392,7 @@ impl<'a> Parser<'a> {
     }
 
     /// Create a snapshot of the `Parser`.
-    pub(super) fn create_snapshot_for_diagnostic(&self) -> SnapshotParser<'a> {
+    pub fn create_snapshot_for_diagnostic(&self) -> SnapshotParser<'a> {
         let mut snapshot = self.clone();
         let unclosed_delims = self.unclosed_delims.clone();
         // Clear `unclosed_delims` in snapshot to avoid