File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed 
compiler/rustc_ast_passes/src Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change 22//! 
33//! This pass intends to check that the constructed AST is *syntactically valid* to allow the rest 
44//! of the compiler to assume that the AST is valid. These checks cannot be performed during parsing 
5- //! because attribute macros are allowed to accept certain pieces of invalid syntax such as `async 
6- //! fn` within a trait (before async-fn-in-trait was introduced). 
5+ //! because attribute macros are allowed to accept certain pieces of invalid syntax such as a 
6+ //! function without body outside of a trait definition: 
7+ //! 
8+ //! ```ignore (illustrative) 
9+ //! #[my_attribute] 
10+ //! mod foo { 
11+ //!     fn missing_body(); 
12+ //! } 
13+ //! ``` 
714//! 
815//! These checks are run post-expansion, after AST is frozen, to be able to check for erroneous 
916//! constructions produced by proc macros. This pass is only intended for simple checks that do not 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments