offset_of
This commit is contained in:
parent
f533800225
commit
84385bff42
@ -345,6 +345,7 @@ pub(crate) fn format_expr(
|
|||||||
// Style Guide RFC for InlineAsm variant pending
|
// Style Guide RFC for InlineAsm variant pending
|
||||||
// https://github.com/rust-dev-tools/fmt-rfcs/issues/152
|
// https://github.com/rust-dev-tools/fmt-rfcs/issues/152
|
||||||
ast::ExprKind::InlineAsm(..) => Some(context.snippet(expr.span).to_owned()),
|
ast::ExprKind::InlineAsm(..) => Some(context.snippet(expr.span).to_owned()),
|
||||||
|
ast::ExprKind::OffsetOf(..) => Some(context.snippet(expr.span).to_owned()),
|
||||||
ast::ExprKind::TryBlock(ref block) => {
|
ast::ExprKind::TryBlock(ref block) => {
|
||||||
if let rw @ Some(_) =
|
if let rw @ Some(_) =
|
||||||
rewrite_single_line_block(context, "try ", block, Some(&expr.attrs), None, shape)
|
rewrite_single_line_block(context, "try ", block, Some(&expr.attrs), None, shape)
|
||||||
|
@ -499,6 +499,7 @@ pub(crate) fn is_block_expr(context: &RewriteContext<'_>, expr: &ast::Expr, repr
|
|||||||
| ast::ExprKind::Field(..)
|
| ast::ExprKind::Field(..)
|
||||||
| ast::ExprKind::IncludedBytes(..)
|
| ast::ExprKind::IncludedBytes(..)
|
||||||
| ast::ExprKind::InlineAsm(..)
|
| ast::ExprKind::InlineAsm(..)
|
||||||
|
| ast::ExprKind::OffsetOf(..)
|
||||||
| ast::ExprKind::Let(..)
|
| ast::ExprKind::Let(..)
|
||||||
| ast::ExprKind::Path(..)
|
| ast::ExprKind::Path(..)
|
||||||
| ast::ExprKind::Range(..)
|
| ast::ExprKind::Range(..)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user