This repository was archived by the owner on May 28, 2025. It is now read-only.
  
  
  
  
    
    
    
      
    
  
  
    
File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed 
compiler/rustc_parse/src/parser Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -66,15 +66,14 @@ impl<'a> Parser<'a> {
6666                token:: Interpolated ( nt)  => may_be_ident ( & nt. 0 ) , 
6767                _ => false , 
6868            } , 
69-             NonterminalKind :: PatParam  {  .. }  | NonterminalKind :: PatWithOr  => { 
70-                 match  & token. kind  { 
69+             NonterminalKind :: PatParam  {  .. }  | NonterminalKind :: PatWithOr  => match  & token. kind  { 
7170                token:: Ident ( ..)  |                          // box, ref, mut, and other identifiers (can stricten) 
7271                token:: OpenDelim ( Delimiter :: Parenthesis )  |  // tuple pattern 
7372                token:: OpenDelim ( Delimiter :: Bracket )  |      // slice pattern 
7473                token:: BinOp ( token:: And )  |                  // reference 
7574                token:: BinOp ( token:: Minus )  |                // negative literal 
7675                token:: AndAnd  |                             // double reference 
77-                 token:: Literal ( _)  |                        // literal 
76+                 token:: Literal ( _)  |                          // literal 
7877                token:: DotDot  |                             // range pattern (future compat) 
7978                token:: DotDotDot  |                          // range pattern (future compat) 
8079                token:: ModSep  |                             // path 
@@ -84,8 +83,7 @@ impl<'a> Parser<'a> {
8483                token:: BinOp ( token:: Or )  => matches ! ( kind,  NonterminalKind :: PatWithOr ) , 
8584                token:: Interpolated ( nt)  => may_be_ident ( & nt. 0 ) , 
8685                _ => false , 
87-             } 
88-             } 
86+             } , 
8987            NonterminalKind :: Lifetime  => match  & token. kind  { 
9088                token:: Lifetime ( _)  => true , 
9189                token:: Interpolated ( nt)  => { 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments