We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
unreachable!
None
1 parent dd301b0 commit fe0d6e1Copy full SHA for fe0d6e1
src/expr.rs
@@ -404,8 +404,11 @@ pub(crate) fn format_expr(
404
ast::ExprKind::FormatArgs(..)
405
| ast::ExprKind::IncludedBytes(..)
406
| ast::ExprKind::OffsetOf(..) => {
407
- // These do not occur in the AST because macros aren't expanded.
408
- unreachable!()
+ // These don't normally occur in the AST because macros aren't expanded. However,
+ // rustfmt tries to parse macro arguments when formatting macros, so it's not totally
409
+ // impossible for rustfmt to come across one of these nodes when formatting a file.
410
+ // Also, rustfmt might get passed the output from `-Zunpretty=expanded`.
411
+ None
412
}
413
ast::ExprKind::Err => None,
414
};
0 commit comments