@@ -140,7 +140,7 @@ syn match rustMacro '#\w\(\w\)*' contains=rustAssert,rustPanic
140
140
141
141
syn match rustEscapeError display contained / \\ ./
142
142
syn match rustEscape display contained / \\\( [nrt0\\ '"]\| x\x\{ 2}\) /
143
- syn match rustEscapeUnicode display contained / \\ u{\x \{ 1,6}}/
143
+ syn match rustEscapeUnicode display contained / \\ u{\% ( \x _* \) \{ 1,6}}/
144
144
syn match rustStringContinuation display contained / \\\n\s */
145
145
syn region rustString start =+ b"+ skip =+ \\\\\|\\ "+ end =+ "+ contains =rustEscape,rustEscapeError,rustStringContinuation
146
146
syn region rustString start =+ "+ skip =+ \\\\\|\\ "+ end =+ "+ contains =rustEscape,rustEscapeUnicode,rustEscapeError,rustStringContinuation,@Spell
@@ -170,7 +170,7 @@ syn match rustFloat display "\<[0-9][0-9_]*\%(\.[0-9][0-9_]*\)\=\%([eE
170
170
syn match rustFloat display " \< [0-9][0-9_]*\% (\. [0-9][0-9_]*\)\=\% ([eE][+-]\= [0-9_]\+\)\=\( f32\| f64\) "
171
171
172
172
" For the benefit of delimitMate
173
- syn region rustLifetimeCandidate display start =/ &'\% (\( [^'\\ ]\|\\\( ['nrt0\\\" ]\| x\x\{ 2}\| u{\x \{ 1,6}}\)\) '\)\@ !/ end =/ [[:cntrl:][:space:][:punct:]]\@ =\| $/ contains =rustSigil,rustLifetime
173
+ syn region rustLifetimeCandidate display start =/ &'\% (\( [^'\\ ]\|\\\( ['nrt0\\\" ]\| x\x\{ 2}\| u{\% ( \x _* \) \{ 1,6}}\)\) '\)\@ !/ end =/ [[:cntrl:][:space:][:punct:]]\@ =\| $/ contains =rustSigil,rustLifetime
174
174
syn region rustGenericRegion display start =/ <\% ('\| [^[cntrl:][:space:][:punct:]]\)\@ =')\S\@ =/ end =/ >/ contains =rustGenericLifetimeCandidate
175
175
syn region rustGenericLifetimeCandidate display start =/ \% (<\| ,\s *\)\@ <='/ end =/ [[:cntrl:][:space:][:punct:]]\@ =\| $/ contains =rustSigil,rustLifetime
176
176
@@ -181,7 +181,7 @@ syn match rustCharacterInvalid display contained /b\?'\zs[\n\r\t']\ze'/
181
181
" The groups negated here add up to 0-255 but nothing else (they do not seem to go beyond ASCII).
182
182
syn match rustCharacterInvalidUnicode display contained / b'\z s[^[:cntrl:][:graph:][:alnum:][:space:]]\z e'/
183
183
syn match rustCharacter / b'\( [^\\ ]\|\\\( .\| x\x\{ 2}\)\) '/ contains =rustEscape,rustEscapeError,rustCharacterInvalid,rustCharacterInvalidUnicode
184
- syn match rustCharacter / '\( [^\\ ]\|\\\( .\| x\x\{ 2}\| u{\x \{ 1,6}}\)\) '/ contains =rustEscape,rustEscapeUnicode,rustEscapeError,rustCharacterInvalid
184
+ syn match rustCharacter / '\( [^\\ ]\|\\\( .\| x\x\{ 2}\| u{\% ( \x _* \) \{ 1,6}}\)\) '/ contains =rustEscape,rustEscapeUnicode,rustEscapeError,rustCharacterInvalid
185
185
186
186
syn match rustShebang / \% ^#![^[].*/
187
187
syn region rustCommentLine start =" //" end =" $" contains =rustTodo,@Spell
0 commit comments