stabilize or_patterns
This commit is contained in:
parent
f5f33ec0e0
commit
db5629adcb
36 changed files with 59 additions and 97 deletions
|
@ -1,7 +1,7 @@
|
|||
use super::attr::DEFAULT_INNER_ATTR_FORBIDDEN;
|
||||
use super::diagnostics::{AttemptLocalParseRecovery, Error};
|
||||
use super::expr::LhsExpr;
|
||||
use super::pat::{GateOr, RecoverComma};
|
||||
use super::pat::RecoverComma;
|
||||
use super::path::PathStyle;
|
||||
use super::TrailingToken;
|
||||
use super::{AttrWrapper, BlockMode, ForceCollect, Parser, Restrictions, SemiColonMode};
|
||||
|
@ -221,8 +221,7 @@ impl<'a> Parser<'a> {
|
|||
/// Parses a local variable declaration.
|
||||
fn parse_local(&mut self, attrs: AttrVec) -> PResult<'a, P<Local>> {
|
||||
let lo = self.prev_token.span;
|
||||
let (pat, colon) =
|
||||
self.parse_pat_before_ty(None, GateOr::Yes, RecoverComma::Yes, "`let` bindings")?;
|
||||
let (pat, colon) = self.parse_pat_before_ty(None, RecoverComma::Yes, "`let` bindings")?;
|
||||
|
||||
let (err, ty) = if colon {
|
||||
// Save the state of the parser before parsing type normally, in case there is a `:`
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue