about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorRalf Jung <post@ralfj.de>2023-04-30 22:35:29 +0200
committerRalf Jung <post@ralfj.de>2023-04-30 22:35:29 +0200
commit4eb1b520d552eb176e5a19312a93ecf2dd88042e (patch)
treee6a384ca7e0b008913e0457fb8f9ea5d3578ae5f /src
parentafe34c8443edd3eb1787c4aff2b233f3ef32a3a9 (diff)
parentf4c9b4c26f7d28416031129f300b9a9bb5e68641 (diff)
downloadrust-4eb1b520d552eb176e5a19312a93ecf2dd88042e.tar.gz
rust-4eb1b520d552eb176e5a19312a93ecf2dd88042e.zip
Merge from rustc
Diffstat (limited to 'src')
-rw-r--r--src/expr.rs4
-rw-r--r--src/utils.rs1
2 files changed, 4 insertions, 1 deletions
diff --git a/src/expr.rs b/src/expr.rs
index ac96bedf2fe..824e4219136 100644
--- a/src/expr.rs
+++ b/src/expr.rs
@@ -399,7 +399,9 @@ pub(crate) fn format_expr(
             }
         }
         ast::ExprKind::Underscore => Some("_".to_owned()),
-        ast::ExprKind::FormatArgs(..) | ast::ExprKind::IncludedBytes(..) => {
+        ast::ExprKind::FormatArgs(..)
+        | ast::ExprKind::IncludedBytes(..)
+        | ast::ExprKind::OffsetOf(..) => {
             // These do not occur in the AST because macros aren't expanded.
             unreachable!()
         }
diff --git a/src/utils.rs b/src/utils.rs
index a26375ee643..ca171657407 100644
--- a/src/utils.rs
+++ b/src/utils.rs
@@ -499,6 +499,7 @@ pub(crate) fn is_block_expr(context: &RewriteContext<'_>, expr: &ast::Expr, repr
         | ast::ExprKind::Field(..)
         | ast::ExprKind::IncludedBytes(..)
         | ast::ExprKind::InlineAsm(..)
+        | ast::ExprKind::OffsetOf(..)
         | ast::ExprKind::Let(..)
         | ast::ExprKind::Path(..)
         | ast::ExprKind::Range(..)