about summary refs log tree commit diff
path: root/src/libsyntax/parse/parser/stmt.rs
diff options
context:
space:
mode:
authorMazdak Farrokhzad <twingoow@gmail.com>2019-08-24 21:43:28 +0200
committerMazdak Farrokhzad <twingoow@gmail.com>2019-08-24 22:29:57 +0200
commitb2966e651de3bf83ab9c712a1afaeba84162cab1 (patch)
tree3d5cdeb72531f694ae80f3dd03589c1829956a8d /src/libsyntax/parse/parser/stmt.rs
parentb205055c7bc92c0f873755996e6fac3e694c7e72 (diff)
downloadrust-b2966e651de3bf83ab9c712a1afaeba84162cab1.tar.gz
rust-b2966e651de3bf83ab9c712a1afaeba84162cab1.zip
parser: bool -> GateOr.
Diffstat (limited to 'src/libsyntax/parse/parser/stmt.rs')
-rw-r--r--src/libsyntax/parse/parser/stmt.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libsyntax/parse/parser/stmt.rs b/src/libsyntax/parse/parser/stmt.rs
index 3c8cb4ea5a5..651ebf6342e 100644
--- a/src/libsyntax/parse/parser/stmt.rs
+++ b/src/libsyntax/parse/parser/stmt.rs
@@ -1,6 +1,7 @@
 use super::{Parser, PResult, Restrictions, PrevTokenKind, SemiColonMode, BlockMode};
 use super::expr::LhsExpr;
 use super::path::PathStyle;
+use super::pat::GateOr;
 
 use crate::ptr::P;
 use crate::{maybe_whole, ThinVec};
@@ -207,7 +208,7 @@ impl<'a> Parser<'a> {
     /// Parses a local variable declaration.
     fn parse_local(&mut self, attrs: ThinVec<Attribute>) -> PResult<'a, P<Local>> {
         let lo = self.prev_span;
-        let pat = self.parse_top_pat(true)?;
+        let pat = self.parse_top_pat(GateOr::Yes)?;
 
         let (err, ty) = if self.eat(&token::Colon) {
             // Save the state of the parser before parsing type normally, in case there is a `:`