diff options
| author | Mara Bos <m-ou.se@m-ou.se> | 2023-01-12 00:45:29 +0100 |
|---|---|---|
| committer | Mara Bos <m-ou.se@m-ou.se> | 2023-01-12 00:45:29 +0100 |
| commit | 56593104acef6afc0f3d29c765801bb44ec02c65 (patch) | |
| tree | 5ee244e57a7419b39de2b182fe6e71f748e6f192 | |
| parent | bcf388f4ac3261d1cc0490415a81d5e4939c7915 (diff) | |
| download | rust-56593104acef6afc0f3d29c765801bb44ec02c65.tar.gz rust-56593104acef6afc0f3d29c765801bb44ec02c65.zip | |
Update comment explaining format_args!() expansion.
| -rw-r--r-- | compiler/rustc_builtin_macros/src/format.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/compiler/rustc_builtin_macros/src/format.rs b/compiler/rustc_builtin_macros/src/format.rs index 47b63a7fa12..a246aefc806 100644 --- a/compiler/rustc_builtin_macros/src/format.rs +++ b/compiler/rustc_builtin_macros/src/format.rs @@ -20,11 +20,11 @@ use rustc_lint_defs::{BufferedEarlyLint, BuiltinLintDiagnostics, LintId}; // 1. First, `parse_args` will parse the `(literal, arg, arg, name=arg, name=arg)` syntax, // but doesn't parse the template (the literal) itself. // 2. Second, `make_format_args` will parse the template, the format options, resolve argument references, -// produce diagnostics, and turn the whole thing into a `FormatArgs` structure. -// 3. Finally, `expand_parsed_format_args` will turn that `FormatArgs` structure -// into the expression that the macro expands to. +// produce diagnostics, and turn the whole thing into a `FormatArgs` AST node. +// 3. Much later, in AST lowering (rustc_ast_lowering), that `FormatArgs` structure will be turned +// into the expression of type `core::fmt::Arguments`. -// See format/ast.rs for the FormatArgs structure and glossary. +// See rustc_ast/src/format.rs for the FormatArgs structure and glossary. // Only used in parse_args and report_invalid_references, // to indicate how a referred argument was used. |
