Skip to content

Commit 5acd608

Browse files
authored
Syntax: Better error recovery in generics. (#410)
2 parents 62b1e49 + e2c35b0 commit 5acd608

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

RustEnhanced.sublime-syntax

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -455,7 +455,7 @@ contexts:
455455
scope: punctuation.definition.generic.begin.rust
456456
push: generic-angles-contents
457457
# Alert the user of a broken generic construct
458-
- match: '.'
458+
- match: '(?=\S)'
459459
scope: invalid.illegal.rust
460460
pop: true
461461

@@ -478,7 +478,7 @@ contexts:
478478
scope: punctuation.separator.rust
479479
- match: '\+|\bas\b|='
480480
scope: keyword.operator.rust
481-
- match: '\S'
481+
- match: '(?=\S)'
482482
scope: invalid.illegal.rust
483483
pop: true
484484

0 commit comments

Comments
 (0)