Skip to content

Commit 84385bf

Browse files
committed
offset_of
1 parent f533800 commit 84385bf

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

src/expr.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -345,6 +345,7 @@ pub(crate) fn format_expr(
345345
// Style Guide RFC for InlineAsm variant pending
346346
// https://github.com/rust-dev-tools/fmt-rfcs/issues/152
347347
ast::ExprKind::InlineAsm(..) => Some(context.snippet(expr.span).to_owned()),
348+
ast::ExprKind::OffsetOf(..) => Some(context.snippet(expr.span).to_owned()),
348349
ast::ExprKind::TryBlock(ref block) => {
349350
if let rw @ Some(_) =
350351
rewrite_single_line_block(context, "try ", block, Some(&expr.attrs), None, shape)

src/utils.rs

Lines changed: 1 addition & 0 deletions
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)