Skip to content

Commit 5659310

Browse files
committed
Update comment explaining format_args!() expansion.
1 parent bcf388f commit 5659310

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

compiler/rustc_builtin_macros/src/format.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@ use rustc_lint_defs::{BufferedEarlyLint, BuiltinLintDiagnostics, LintId};
2020
// 1. First, `parse_args` will parse the `(literal, arg, arg, name=arg, name=arg)` syntax,
2121
// but doesn't parse the template (the literal) itself.
2222
// 2. Second, `make_format_args` will parse the template, the format options, resolve argument references,
23-
// produce diagnostics, and turn the whole thing into a `FormatArgs` structure.
24-
// 3. Finally, `expand_parsed_format_args` will turn that `FormatArgs` structure
25-
// into the expression that the macro expands to.
23+
// produce diagnostics, and turn the whole thing into a `FormatArgs` AST node.
24+
// 3. Much later, in AST lowering (rustc_ast_lowering), that `FormatArgs` structure will be turned
25+
// into the expression of type `core::fmt::Arguments`.
2626

27-
// See format/ast.rs for the FormatArgs structure and glossary.
27+
// See rustc_ast/src/format.rs for the FormatArgs structure and glossary.
2828

2929
// Only used in parse_args and report_invalid_references,
3030
// to indicate how a referred argument was used.

0 commit comments

Comments
 (0)