Skip to content

Commit 4eb1b52

Browse files
committed
Merge from rustc
2 parents afe34c8 + f4c9b4c commit 4eb1b52

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

src/expr.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,9 @@ pub(crate) fn format_expr(
399399
}
400400
}
401401
ast::ExprKind::Underscore => Some("_".to_owned()),
402-
ast::ExprKind::FormatArgs(..) | ast::ExprKind::IncludedBytes(..) => {
402+
ast::ExprKind::FormatArgs(..)
403+
| ast::ExprKind::IncludedBytes(..)
404+
| ast::ExprKind::OffsetOf(..) => {
403405
// These do not occur in the AST because macros aren't expanded.
404406
unreachable!()
405407
}

src/utils.rs

+1
Original file line numberDiff line numberDiff line change
@@ -499,6 +499,7 @@ pub(crate) fn is_block_expr(context: &RewriteContext<'_>, expr: &ast::Expr, repr
499499
| ast::ExprKind::Field(..)
500500
| ast::ExprKind::IncludedBytes(..)
501501
| ast::ExprKind::InlineAsm(..)
502+
| ast::ExprKind::OffsetOf(..)
502503
| ast::ExprKind::Let(..)
503504
| ast::ExprKind::Path(..)
504505
| ast::ExprKind::Range(..)

0 commit comments

Comments
 (0)