Skip to content

Commit 9e30d45

Browse files
committed
---
yaml --- r: 50413 b: refs/heads/auto c: 8e30d3f h: refs/heads/master i: 50411: e542d12 v: v3
1 parent 843a5df commit 9e30d45

File tree

2 files changed

+15
-13
lines changed

2 files changed

+15
-13
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,5 @@ refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0
1414
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
1515
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1616
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
17-
refs/heads/auto: 6dd20c8186e1eb2819f50d09ddba6941b7ff85b8
17+
refs/heads/auto: 8e30d3fc0bad3bac9f5f1fc2b925aa831aca8ff8
1818
refs/heads/servo: af82457af293e2a842ba6b7759b70288da276167

branches/auto/src/etc/vim/syntax/rust.vim

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,20 @@ elseif exists("b:current_syntax")
1010
finish
1111
endif
1212

13-
syn match rustAssert "\<assert\(\w\)*"
14-
syn keyword rustKeyword as break
15-
syn keyword rustKeyword copy do drop else extern
13+
syn keyword rustConditional match if else
14+
syn keyword rustOperator as
15+
16+
syn keyword rustKeyword break copy do drop extern
1617
syn keyword rustKeyword for if impl let log
17-
syn keyword rustKeyword loop match mod once priv pub pure
18-
syn keyword rustKeyword ref return static
18+
syn keyword rustKeyword copy do drop extern
19+
syn keyword rustKeyword for impl let log
20+
syn keyword rustKeyword loop mod once priv pub
21+
syn keyword rustKeyword return
1922
syn keyword rustKeyword unsafe use while
2023
" FIXME: Scoped impl's name is also fallen in this category
2124
syn keyword rustKeyword mod trait struct enum type nextgroup=rustIdentifier skipwhite
2225
syn keyword rustKeyword fn nextgroup=rustFuncName skipwhite
23-
syn keyword rustStorage const mut
26+
syn keyword rustStorage const mut ref static
2427

2528
syn match rustIdentifier contains=rustIdentifierPrime "\%([^[:cntrl:][:space:][:punct:][:digit:]]\|_\)\%([^[:cntrl:][:punct:][:space:]]\|_\)*" display contained
2629
syn match rustFuncName "\%([^[:cntrl:][:space:][:punct:][:digit:]]\|_\)\%([^[:cntrl:][:punct:][:space:]]\|_\)*" display contained
@@ -71,8 +74,8 @@ syn keyword rustConstant STDIN_FILENO STDOUT_FILENO STDERR_FILENO
7174
syn match rustModPath "\w\(\w\)*::[^<]"he=e-3,me=e-3
7275
syn match rustModPathSep "::"
7376

74-
syn match rustFuncCall "\w\(\w\)*("he=e-1,me=e-1 contains=rustAssert
75-
syn match rustFuncCall "\w\(\w\)*::<"he=e-3,me=e-3 contains=rustAssert " foo::<T>();
77+
syn match rustFuncCall "\w\(\w\)*("he=e-1,me=e-1
78+
syn match rustFuncCall "\w\(\w\)*::<"he=e-3,me=e-3 " foo::<T>();
7679

7780
syn match rustMacro '\w\(\w\)*!'
7881
syn match rustMacro '#\w\(\w\)*'
@@ -110,8 +113,7 @@ syn match rustCharacter "'\([^'\\]\|\\\(['nrt\\\"]\|x\x\{2}\|u\x\{4}\|U\x\{8
110113
syn region rustComment start="/\*" end="\*/" contains=rustComment,rustTodo
111114
syn region rustComment start="//" skip="\\$" end="$" contains=rustTodo keepend
112115

113-
114-
syn keyword rustTodo TODO FIXME XXX NB unsafe
116+
syn keyword rustTodo contained TODO FIXME XXX NB
115117

116118
hi def link rustHexNumber rustNumber
117119
hi def link rustBinNumber rustNumber
@@ -126,8 +128,9 @@ hi def link rustBoolean Boolean
126128
hi def link rustConstant Constant
127129
hi def link rustSelf Constant
128130
hi def link rustFloat Float
129-
hi def link rustAssert Keyword
131+
hi def link rustOperator Operator
130132
hi def link rustKeyword Keyword
133+
hi def link rustConditional Conditional
131134
hi def link rustIdentifier Identifier
132135
hi def link rustModPath Include
133136
hi def link rustFuncName Function
@@ -140,7 +143,6 @@ hi def link rustStorage StorageClass
140143
hi def link rustLifetime Special
141144

142145
" Other Suggestions:
143-
" hi rustAssert ctermfg=yellow
144146
" hi rustMacro ctermfg=magenta
145147

146148
syn sync minlines=200

0 commit comments

Comments
 (0)