File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 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> {
123123            is_trailing_mac, 
124124            is_local, 
125125        }  = * self ; 
126-         let  snapshot = & mut  parser. clone ( ) ; 
126+         let  snapshot = & mut  parser. create_snapshot_for_diagnostic ( ) ; 
127127        let  fragment = match  parse_ast_fragment ( parser,  kind)  { 
128128            Ok ( f)  => f, 
129129            Err ( err)  => { 
Original file line number Diff line number Diff line change @@ -336,7 +336,7 @@ struct InInTypo {
336336// SnapshotParser is used to create a snapshot of the parser 
337337// without causing duplicate errors being emitted when the `Parser` 
338338// is dropped. 
339- pub ( super )  struct  SnapshotParser < ' a >  { 
339+ pub  struct  SnapshotParser < ' a >  { 
340340    parser :  Parser < ' a > , 
341341    unclosed_delims :  Vec < UnmatchedBrace > , 
342342} 
@@ -392,7 +392,7 @@ impl<'a> Parser<'a> {
392392    } 
393393
394394    /// 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 >  { 
396396        let  mut  snapshot = self . clone ( ) ; 
397397        let  unclosed_delims = self . unclosed_delims . clone ( ) ; 
398398        // Clear `unclosed_delims` in snapshot to avoid 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments