File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed 
compiler/rustc_parse/src/parser Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -927,8 +927,12 @@ impl<'a> Parser<'a> {
927927/// If no modifiers are present, this does not consume any tokens. 
928928/// 
929929/// ```ebnf 
930- /// TRAIT_BOUND_MODIFIERS = [["~"] "const"] ["async"] ["?" | "!"] 
930+ /// CONSTNESS = [["~"] "const"] 
931+ /// ASYNCNESS = ["async"] 
932+ /// POLARITY = ["?" | "!"] 
931933/// ``` 
934+ /// 
935+ /// See `parse_generic_ty_bound` for the complete grammar of trait bound modifiers. 
932936fn  parse_trait_bound_modifiers ( & mut  self )  -> PResult < ' a ,  TraitBoundModifiers >  { 
933937        let  modifier_lo = self . token . span ; 
934938        let  constness = if  self . eat ( & token:: Tilde )  { 
@@ -1007,7 +1011,7 @@ impl<'a> Parser<'a> {
10071011    /// Parses a type bound according to: 
10081012/// ```ebnf 
10091013/// TY_BOUND = TY_BOUND_NOPAREN | (TY_BOUND_NOPAREN) 
1010- /// TY_BOUND_NOPAREN = [for<LT_PARAM_DEFS>] [TRAIT_BOUND_MODIFIERS ] SIMPLE_PATH 
1014+ /// TY_BOUND_NOPAREN = [for<GENERIC_PARAMS> CONSTNESS ASYNCNESS | POLARITY ] SIMPLE_PATH 
10111015/// ``` 
10121016/// 
10131017/// For example, this grammar accepts `for<'a: 'b> ~const ?m::Trait<'a>`. 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments