File tree 1 file changed +9
-2
lines changed
compiler/rustc_ast_passes/src
1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change 2
2
//!
3
3
//! This pass intends to check that the constructed AST is *syntactically valid* to allow the rest
4
4
//! 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
+ //! ```
7
14
//!
8
15
//! These checks are run post-expansion, after AST is frozen, to be able to check for erroneous
9
16
//! 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