File tree 2 files changed +3
-3
lines changed
2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -123,7 +123,7 @@ impl<'a> ParserAnyMacro<'a> {
123
123
is_trailing_mac,
124
124
is_local,
125
125
} = * self ;
126
- let snapshot = & mut parser. clone ( ) ;
126
+ let snapshot = & mut parser. create_snapshot_for_diagnostic ( ) ;
127
127
let fragment = match parse_ast_fragment ( parser, kind) {
128
128
Ok ( f) => f,
129
129
Err ( err) => {
Original file line number Diff line number Diff line change @@ -336,7 +336,7 @@ struct InInTypo {
336
336
// SnapshotParser is used to create a snapshot of the parser
337
337
// without causing duplicate errors being emitted when the `Parser`
338
338
// is dropped.
339
- pub ( super ) struct SnapshotParser < ' a > {
339
+ pub struct SnapshotParser < ' a > {
340
340
parser : Parser < ' a > ,
341
341
unclosed_delims : Vec < UnmatchedBrace > ,
342
342
}
@@ -392,7 +392,7 @@ impl<'a> Parser<'a> {
392
392
}
393
393
394
394
/// Create a snapshot of the `Parser`.
395
- pub ( super ) fn create_snapshot_for_diagnostic ( & self ) -> SnapshotParser < ' a > {
395
+ pub fn create_snapshot_for_diagnostic ( & self ) -> SnapshotParser < ' a > {
396
396
let mut snapshot = self . clone ( ) ;
397
397
let unclosed_delims = self . unclosed_delims . clone ( ) ;
398
398
// Clear `unclosed_delims` in snapshot to avoid
You can’t perform that action at this time.
0 commit comments