Auto merge of #114353 - nnethercote:parser-ast-cleanups, r=petrochenkov
Some parser and AST cleanups Things I found while looking closely at this code. r? `@petrochenkov`
This commit is contained in:
commit
fb31b3c34e
17 changed files with 82 additions and 146 deletions
|
|
@ -1382,12 +1382,8 @@ pub(crate) fn can_be_overflowed_expr(
|
|||
|| (context.use_block_indent() && args_len == 1)
|
||||
}
|
||||
ast::ExprKind::MacCall(ref mac) => {
|
||||
match (
|
||||
rustc_ast::ast::MacDelimiter::from_token(mac.args.delim.to_token()),
|
||||
context.config.overflow_delimited_expr(),
|
||||
) {
|
||||
(Some(ast::MacDelimiter::Bracket), true)
|
||||
| (Some(ast::MacDelimiter::Brace), true) => true,
|
||||
match (mac.args.delim, context.config.overflow_delimited_expr()) {
|
||||
(Delimiter::Bracket, true) | (Delimiter::Brace, true) => true,
|
||||
_ => context.use_block_indent() && args_len == 1,
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue