Move condition out of maybe_recover_unexpected_comma
.
This commit is contained in:
parent
d4347ed678
commit
7b6c5c76a5
2 changed files with 9 additions and 6 deletions
|
@ -1,7 +1,7 @@
|
|||
use super::pat::Expected;
|
||||
use super::{
|
||||
BlockMode, CommaRecoveryMode, Parser, PathStyle, RecoverComma, Restrictions, SemiColonMode,
|
||||
SeqSep, TokenExpectType, TokenType,
|
||||
BlockMode, CommaRecoveryMode, Parser, PathStyle, Restrictions, SemiColonMode, SeqSep,
|
||||
TokenExpectType, TokenType,
|
||||
};
|
||||
|
||||
use crate::lexer::UnmatchedBrace;
|
||||
|
@ -2580,10 +2580,9 @@ impl<'a> Parser<'a> {
|
|||
crate fn maybe_recover_unexpected_comma(
|
||||
&mut self,
|
||||
lo: Span,
|
||||
rc: RecoverComma,
|
||||
rt: CommaRecoveryMode,
|
||||
) -> PResult<'a, ()> {
|
||||
if rc == RecoverComma::No || self.token != token::Comma {
|
||||
if self.token != token::Comma {
|
||||
return Ok(());
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue