about summary refs log tree commit diff
path: root/src/libsyntax/tokenstream.rs
diff options
context:
space:
mode:
authorEsteban Küber <esteban@kuber.com.ar>2019-03-13 00:10:16 -0700
committerEsteban Küber <esteban@kuber.com.ar>2019-03-13 00:10:16 -0700
commit27abd52170b2d2769f5fbed665795bdb9a3facef (patch)
tree39ba51085fb4746d3f7af35a454e7c7184f1143a /src/libsyntax/tokenstream.rs
parentb9d12edd6ce7b364fb1a4de53f7541d536df0940 (diff)
downloadrust-27abd52170b2d2769f5fbed665795bdb9a3facef.tar.gz
rust-27abd52170b2d2769f5fbed665795bdb9a3facef.zip
Fix operator precedence
Diffstat (limited to 'src/libsyntax/tokenstream.rs')
-rw-r--r--src/libsyntax/tokenstream.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libsyntax/tokenstream.rs b/src/libsyntax/tokenstream.rs
index 5caa59a53f9..80a7bde606a 100644
--- a/src/libsyntax/tokenstream.rs
+++ b/src/libsyntax/tokenstream.rs
@@ -181,8 +181,8 @@ impl TokenStream {
                         (_, (TokenTree::Token(_, token::Token::Comma), _)) => continue,
                         ((TokenTree::Token(sp, token_left), NonJoint),
                          (TokenTree::Token(_, token_right), _))
-                        if token_left.is_ident() || token_left.is_lit() &&
-                            token_right.is_ident() || token_right.is_lit() => *sp,
+                        if (token_left.is_ident() || token_left.is_lit()) &&
+                            (token_right.is_ident() || token_right.is_lit()) => *sp,
                         ((TokenTree::Delimited(sp, ..), NonJoint), _) => sp.entire(),
                         _ => continue,
                     };