about summary refs log tree commit diff
path: root/src/libsyntax/parse
diff options
context:
space:
mode:
authorTamir Duberstein <tamird@gmail.com>2015-04-29 14:58:43 -0700
committerTamir Duberstein <tamird@gmail.com>2015-05-05 22:03:45 -0400
commit5cfa713a1c7f23fb8affc8dfaac8c44ef522f403 (patch)
treee461fc0d1bffa45268a7914764b138cb17e9d3b3 /src/libsyntax/parse
parent252b5444daf83a9f1b18e2dfe4b46830d2be4447 (diff)
downloadrust-5cfa713a1c7f23fb8affc8dfaac8c44ef522f403.tar.gz
rust-5cfa713a1c7f23fb8affc8dfaac8c44ef522f403.zip
Use `empty()` instead of a special const
Diffstat (limited to 'src/libsyntax/parse')
-rw-r--r--src/libsyntax/parse/parser.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs
index a7b1beace51..eb1c338ac85 100644
--- a/src/libsyntax/parse/parser.rs
+++ b/src/libsyntax/parse/parser.rs
@@ -88,7 +88,6 @@ use std::slice;
 
 bitflags! {
     flags Restrictions: u8 {
-        const UNRESTRICTED                  = 0,
         const RESTRICTION_STMT_EXPR         = 1 << 0,
         const RESTRICTION_NO_STRUCT_LITERAL = 1 << 1,
     }
@@ -339,7 +338,7 @@ impl<'a> Parser<'a> {
             buffer_start: 0,
             buffer_end: 0,
             tokens_consumed: 0,
-            restrictions: Restrictions::UNRESTRICTED,
+            restrictions: Restrictions::empty(),
             quote_depth: 0,
             obsolete_set: HashSet::new(),
             mod_path_stack: Vec::new(),
@@ -2991,7 +2990,7 @@ impl<'a> Parser<'a> {
 
     /// Parse an expression
     pub fn parse_expr_nopanic(&mut self) -> PResult<P<Expr>> {
-        return self.parse_expr_res(Restrictions::UNRESTRICTED);
+        self.parse_expr_res(Restrictions::empty())
     }
 
     /// Parse an expression, subject to the given restrictions