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> {
779
779
let token_str = pprust:: token_kind_to_string ( t) ;
780
780
781
781
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
-
791
782
Some ( right_pipe_span) if self . token . kind == TokenKind :: Semi => {
792
783
// Finding a semicolon instead of a comma
793
784
// after a closure body indicates that the
@@ -803,7 +794,14 @@ impl<'a> Parser<'a> {
803
794
continue ;
804
795
}
805
796
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
+ }
807
805
}
808
806
809
807
// If this was a missing `@` in a binding pattern
You can’t perform that action at this time.
0 commit comments