]> git.lizzy.rs Git - rust.git/commitdiff
Corrected formatting mistakes.
authorAaron Keen <aaronkeen@gmail.com>
Wed, 16 Dec 2015 10:53:36 +0000 (11:53 +0100)
committerAaron Keen <aaronkeen@gmail.com>
Wed, 16 Dec 2015 10:53:36 +0000 (11:53 +0100)
Changed bit manipulation to use supported - (set difference) instead
of explicit '& !'.

src/libsyntax/parse/parser.rs

index 6cbdd9f341118cb3e40816cd8c678f98658c6118..4f4a78e8760a7a0a74a48e03ad9de27e046c7c75 100644 (file)
@@ -2814,22 +2814,22 @@ pub fn parse_assoc_expr_with(&mut self,
 
             let rhs = try!(match op.fixity() {
                 Fixity::Right => self.with_res(
-                    restrictions & !Restrictions::RESTRICTION_STMT_EXPR,
-                    |this|{
+                    restrictions Restrictions::RESTRICTION_STMT_EXPR,
+                    |this| {
                         this.parse_assoc_expr_with(op.precedence(),
-                        LhsExpr::NotYetParsed)
+                            LhsExpr::NotYetParsed)
                 }),
                 Fixity::Left => self.with_res(
-                    restrictions & !Restrictions::RESTRICTION_STMT_EXPR,
-                    |this|{
+                    restrictions Restrictions::RESTRICTION_STMT_EXPR,
+                    |this| {
                         this.parse_assoc_expr_with(op.precedence() + 1,
                             LhsExpr::NotYetParsed)
                 }),
                 // We currently have no non-associative operators that are not handled above by
                 // the special cases. The code is here only for future convenience.
                 Fixity::None => self.with_res(
-                    restrictions & !Restrictions::RESTRICTION_STMT_EXPR,
-                    |this|{
+                    restrictions Restrictions::RESTRICTION_STMT_EXPR,
+                    |this| {
                         this.parse_assoc_expr_with(op.precedence() + 1,
                             LhsExpr::NotYetParsed)
                 }),