Expand format_args!() in rust_ast_lowering.
This commit is contained in:
parent
e83945150f
commit
a4dbcb525b
19 changed files with 535 additions and 384 deletions
|
@ -48,7 +48,7 @@ impl NonConstExpr {
|
|||
Self::Match(TryDesugar) => &[sym::const_try],
|
||||
|
||||
// All other expressions are allowed.
|
||||
Self::Loop(Loop | While) | Self::Match(Normal) => &[],
|
||||
Self::Loop(Loop | While) | Self::Match(Normal | FormatArgs) => &[],
|
||||
};
|
||||
|
||||
Some(gates)
|
||||
|
|
|
@ -567,7 +567,7 @@ impl<'v> ast_visit::Visitor<'v> for StatCollector<'v> {
|
|||
Box, Array, ConstBlock, Call, MethodCall, Tup, Binary, Unary, Lit, Cast, Type, Let,
|
||||
If, While, ForLoop, Loop, Match, Closure, Block, Async, Await, TryBlock, Assign,
|
||||
AssignOp, Field, Index, Range, Underscore, Path, AddrOf, Break, Continue, Ret,
|
||||
InlineAsm, MacCall, Struct, Repeat, Paren, Try, Yield, Yeet, IncludedBytes, Err
|
||||
InlineAsm, FormatArgs, MacCall, Struct, Repeat, Paren, Try, Yield, Yeet, IncludedBytes, Err
|
||||
]
|
||||
);
|
||||
ast_visit::walk_expr(self, e)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue