about summary refs log tree commit diff
path: root/compiler/rustc_ast/src/util/parser.rs
diff options
context:
space:
mode:
authorDrMeepster <19316085+DrMeepster@users.noreply.github.com>2022-09-11 00:37:49 -0700
committerDrMeepster <19316085+DrMeepster@users.noreply.github.com>2023-04-21 02:14:02 -0700
commit511e457c4ba88097ee46ef07b7ef80ce4dd4a3c5 (patch)
tree9aed1b0210cfd3c784a7c5cc89646b8d9dad5427 /compiler/rustc_ast/src/util/parser.rs
parentb92a41c6760801a7128ca0ec69ba4ba9c9194054 (diff)
downloadrust-511e457c4ba88097ee46ef07b7ef80ce4dd4a3c5.tar.gz
rust-511e457c4ba88097ee46ef07b7ef80ce4dd4a3c5.zip
offset_of
Diffstat (limited to 'compiler/rustc_ast/src/util/parser.rs')
-rw-r--r--compiler/rustc_ast/src/util/parser.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/compiler/rustc_ast/src/util/parser.rs b/compiler/rustc_ast/src/util/parser.rs
index 3893875e9a4..24b4bd8623f 100644
--- a/compiler/rustc_ast/src/util/parser.rs
+++ b/compiler/rustc_ast/src/util/parser.rs
@@ -269,6 +269,7 @@ pub enum ExprPrecedence {
     Index,
     Try,
     InlineAsm,
+    OffsetOf,
     Mac,
     FormatArgs,
 
@@ -335,7 +336,8 @@ impl ExprPrecedence {
             | ExprPrecedence::Try
             | ExprPrecedence::InlineAsm
             | ExprPrecedence::Mac
-            | ExprPrecedence::FormatArgs => PREC_POSTFIX,
+            | ExprPrecedence::FormatArgs
+            | ExprPrecedence::OffsetOf => PREC_POSTFIX,
 
             // Never need parens
             ExprPrecedence::Array