File tree Expand file tree Collapse file tree 1 file changed +8
-10
lines changed
compiler/rustc_parse/src/parser Expand file tree Collapse file tree 1 file changed +8
-10
lines changed Original file line number Diff line number Diff line change @@ -779,15 +779,6 @@ impl<'a> Parser<'a> {
779779 let token_str = pprust:: token_kind_to_string ( t) ;
780780
781781 match self . last_closure_body . take ( ) {
782- None => {
783- // Attempt to keep parsing if it was a similar separator.
784- if let Some ( ref tokens) = t. similar_tokens ( ) {
785- if tokens. contains ( & self . token . kind ) && !unclosed_delims {
786- self . bump ( ) ;
787- }
788- }
789- }
790-
791782 Some ( right_pipe_span) if self . token . kind == TokenKind :: Semi => {
792783 // Finding a semicolon instead of a comma
793784 // after a closure body indicates that the
@@ -803,7 +794,14 @@ impl<'a> Parser<'a> {
803794 continue ;
804795 }
805796
806- _ => { }
797+ _ => {
798+ // Attempt to keep parsing if it was a similar separator.
799+ if let Some ( ref tokens) = t. similar_tokens ( ) {
800+ if tokens. contains ( & self . token . kind ) && !unclosed_delims {
801+ self . bump ( ) ;
802+ }
803+ }
804+ }
807805 }
808806
809807 // If this was a missing `@` in a binding pattern
You can’t perform that action at this time.
0 commit comments