@@ -144,10 +144,11 @@ syn match rustMacro '#\w\(\w\)*' contains=rustAssert,rustPanic
144
144
syn match rustEscapeError display contained / \\ ./
145
145
syn match rustEscape display contained / \\\( [nrt0\\ '"]\| x\x\{ 2}\) /
146
146
syn match rustEscapeUnicode display contained / \\ u{\% (\x _*\)\{ 1,6}}/
147
+ syn region rustStringIdentifier contained matchgroup =rustStringDelimiter start =+ {+ end =/ }\| :/
147
148
syn match rustStringContinuation display contained / \\\n\s */
148
149
syn region rustString matchgroup =rustStringDelimiter start =+ b"+ skip =+ \\\\\|\\ "+ end =+ "+ contains =rustEscape,rustEscapeError,rustStringContinuation
149
- syn region rustString matchgroup =rustStringDelimiter start =+ "+ skip =+ \\\\\|\\ "+ end =+ "+ contains =rustEscape,rustEscapeUnicode,rustEscapeError,rustStringContinuation,@Spell
150
- syn region rustString matchgroup =rustStringDelimiter start =' b\? r\z (#*\) "' end =' "\z 1' contains =@Spell
150
+ syn region rustString matchgroup =rustStringDelimiter start =+ "+ skip =+ \\\\\|\\ "+ end =+ "+ contains =rustEscape,rustEscapeUnicode,rustEscapeError,rustStringContinuation,@Spell,rustStringIdentifier
151
+ syn region rustString matchgroup =rustStringDelimiter start =' b\? r\z (#*\) "' end =' "\z 1' contains =@Spell,rustStringIdentifier
151
152
152
153
" Match attributes with either arbitrary syntax or special highlighting for
153
154
" derives. We still highlight strings and comments inside of the attribute.
@@ -308,6 +309,7 @@ hi def link rustEscapeError Error
308
309
hi def link rustStringContinuation Special
309
310
hi def link rustString String
310
311
hi def link rustStringDelimiter String
312
+ hi def link rustStringIdentifier rustIdentifier
311
313
hi def link rustCharacterInvalid Error
312
314
hi def link rustCharacterInvalidUnicode rustCharacterInvalid
313
315
hi def link rustCharacter Character
0 commit comments