Update rustfmt for ast::ExprKind::FormatArgs.
Rustfmt doesn't expand macros, so that's easy: FormatArgs nodes do not occur in the unexpanded AST.
This commit is contained in:
parent
8c8aa3873f
commit
80d196d789
@ -399,7 +399,10 @@ pub(crate) fn format_expr(
|
||||
}
|
||||
}
|
||||
ast::ExprKind::Underscore => Some("_".to_owned()),
|
||||
ast::ExprKind::IncludedBytes(..) => unreachable!(),
|
||||
ast::ExprKind::FormatArgs(..) | ast::ExprKind::IncludedBytes(..) => {
|
||||
// These do not occur in the AST because macros aren't expanded.
|
||||
unreachable!()
|
||||
}
|
||||
ast::ExprKind::Err => None,
|
||||
};
|
||||
|
||||
|
@ -462,6 +462,7 @@ pub(crate) fn first_line_ends_with(s: &str, c: char) -> bool {
|
||||
pub(crate) fn is_block_expr(context: &RewriteContext<'_>, expr: &ast::Expr, repr: &str) -> bool {
|
||||
match expr.kind {
|
||||
ast::ExprKind::MacCall(..)
|
||||
| ast::ExprKind::FormatArgs(..)
|
||||
| ast::ExprKind::Call(..)
|
||||
| ast::ExprKind::MethodCall(..)
|
||||
| ast::ExprKind::Array(..)
|
||||
|
Loading…
x
Reference in New Issue
Block a user