@@ -18,40 +18,30 @@ syn keyword rustOperator as
18
18
19
19
syn match rustAssert " \< assert\(\w\) *!" contained
20
20
syn match rustFail " \< fail\(\w\) *!" contained
21
- syn keyword rustKeyword break
22
- syn keyword rustKeyword box nextgroup =rustBoxPlacement skipwhite skipempty
23
- syn keyword rustKeyword continue
24
- syn keyword rustKeyword extern nextgroup =rustExternCrate,rustObsoleteExternMod skipwhite skipempty
25
- syn keyword rustKeyword fn nextgroup =rustFuncName skipwhite skipempty
21
+ syn keyword rustKeyword break box continue
22
+ syn keyword rustKeyword extern nextgroup =rustExternCrate,rustObsoleteExternMod skipwhite
26
23
syn keyword rustKeyword for in if impl let
27
- syn keyword rustKeyword loop once proc pub
28
- syn keyword rustKeyword return super
29
- syn keyword rustKeyword unsafe virtual while
30
- syn keyword rustKeyword use nextgroup =rustModPath skipwhite skipempty
24
+ syn keyword rustKeyword loop once priv pub
25
+ syn keyword rustKeyword return
26
+ syn keyword rustKeyword unsafe while
27
+ syn keyword rustKeyword use nextgroup =rustModPath skipwhite
31
28
" FIXME: Scoped impl's name is also fallen in this category
32
- syn keyword rustKeyword mod trait struct enum type nextgroup =rustIdentifier skipwhite skipempty
29
+ syn keyword rustKeyword mod trait struct enum type nextgroup =rustIdentifier skipwhite
30
+ syn keyword rustKeyword fn nextgroup =rustFuncName skipwhite
31
+ syn keyword rustKeyword proc
33
32
syn keyword rustStorage mut ref static
34
33
syn keyword rustObsoleteStorage const
35
34
36
35
syn keyword rustInvalidBareKeyword crate
37
36
38
- syn keyword rustExternCrate crate contained nextgroup =rustIdentifier skipwhite skipempty
39
- syn keyword rustObsoleteExternMod mod contained nextgroup =rustIdentifier skipwhite skipempty
37
+ syn keyword rustExternCrate crate contained nextgroup =rustIdentifier skipwhite
38
+ syn keyword rustObsoleteExternMod mod contained nextgroup =rustIdentifier skipwhite
40
39
41
40
syn match rustIdentifier contains =rustIdentifierPrime " \% ([^[:cntrl:][:space:][:punct:][:digit:]]\| _\)\% ([^[:cntrl:][:punct:][:space:]]\| _\) *" display contained
42
41
syn match rustFuncName " \% ([^[:cntrl:][:space:][:punct:][:digit:]]\| _\)\% ([^[:cntrl:][:punct:][:space:]]\| _\) *" display contained
43
42
44
- syn region rustBoxPlacement matchgroup =rustBoxPlacementParens start =" (" end =" )" contains =TOP contained
45
- syn keyword rustBoxPlacementExpr GC containedin =rustBoxPlacement
46
- " Ideally we'd have syntax rules set up to match arbitrary expressions. Since
47
- " we don't, we'll just define temporary contained rules to handle balancing
48
- " delimiters.
49
- syn region rustBoxPlacementBalance start =" (" end =" )" containedin =rustBoxPlacement transparent
50
- syn region rustBoxPlacementBalance start =" \[ " end =" \] " containedin =rustBoxPlacement transparent
51
- " {} are handled by rustFoldBraces
52
-
53
43
" Reserved (but not yet used) keywords {{{2
54
- syn keyword rustReservedKeyword alignof be do offsetof priv pure sizeof typeof unsized yield
44
+ syn keyword rustReservedKeyword alignof be do offsetof pure sizeof typeof yield
55
45
56
46
" Built-in types {{{2
57
47
syn keyword rustType int uint float char bool u8 u16 u32 u64 f32
@@ -62,10 +52,10 @@ syn keyword rustType f64 i8 i16 i32 i64 str Self
62
52
" to make it easy to update.
63
53
64
54
" Core operators {{{3
65
- syn keyword rustTrait Copy Send Sized Share
55
+ syn keyword rustTrait Share Copy Send Sized
66
56
syn keyword rustTrait Add Sub Mul Div Rem Neg Not
67
57
syn keyword rustTrait BitAnd BitOr BitXor
68
- syn keyword rustTrait Drop Deref DerefMut
58
+ syn keyword rustTrait Drop
69
59
syn keyword rustTrait Shl Shr Index
70
60
syn keyword rustEnum Option
71
61
syn keyword rustEnumVariant Some None
@@ -78,6 +68,7 @@ syn keyword rustEnumVariant Ok Err
78
68
" syn keyword rustFunction drop
79
69
80
70
" Types and traits {{{3
71
+ syn keyword rustTrait Any AnyOwnExt AnyRefExt AnyMutRefExt
81
72
syn keyword rustTrait Ascii AsciiCast OwnedAsciiCast AsciiStr IntoBytes
82
73
syn keyword rustTrait ToCStr
83
74
syn keyword rustTrait Char
@@ -89,31 +80,24 @@ syn keyword rustTrait FromIterator Extendable
89
80
syn keyword rustTrait Iterator DoubleEndedIterator RandomAccessIterator CloneableIterator
90
81
syn keyword rustTrait OrdIterator MutableDoubleEndedIterator ExactSize
91
82
syn keyword rustTrait Num NumCast CheckedAdd CheckedSub CheckedMul
92
- syn keyword rustTrait Signed Unsigned
93
- syn keyword rustTrait Primitive Int Float FloatMath ToPrimitive FromPrimitive
94
- " syn keyword rustTrait Expect
95
- syn keyword rustTrait Box
83
+ syn keyword rustTrait Signed Unsigned Round
84
+ syn keyword rustTrait Primitive Int Float ToPrimitive FromPrimitive
96
85
syn keyword rustTrait GenericPath Path PosixPath WindowsPath
97
86
syn keyword rustTrait RawPtr
98
87
syn keyword rustTrait Buffer Writer Reader Seek
99
- syn keyword rustTrait Str StrVector StrSlice OwnedStr IntoMaybeOwned
100
- syn keyword rustTrait StrAllocating
88
+ syn keyword rustTrait Str StrVector StrSlice OwnedStr IntoMaybeOwned StrBuf
101
89
syn keyword rustTrait ToStr IntoStr
102
90
syn keyword rustTrait Tuple1 Tuple2 Tuple3 Tuple4
103
91
syn keyword rustTrait Tuple5 Tuple6 Tuple7 Tuple8
104
92
syn keyword rustTrait Tuple9 Tuple10 Tuple11 Tuple12
105
- syn keyword rustTrait CloneableVector ImmutableCloneableVector MutableCloneableVector
106
- syn keyword rustTrait ImmutableVector MutableVector
107
- syn keyword rustTrait ImmutableEqVector ImmutableTotalOrdVector MutableTotalOrdVector
108
- syn keyword rustTrait Vector VectorVector OwnedVector MutableVectorAllocating
109
- syn keyword rustTrait StrBuf
110
- syn keyword rustTrait Vec
111
-
112
- " syn keyword rustFunction sync_channel channel
113
- syn keyword rustTrait SyncSender Sender Receiver
114
- " syn keyword rustFunction spawn
93
+ syn keyword rustTrait ImmutableEqVector ImmutableTotalOrdVector ImmutableCloneableVector
94
+ syn keyword rustTrait OwnedVector OwnedCloneableVector OwnedEqVector
95
+ syn keyword rustTrait MutableVector MutableTotalOrdVector
96
+ syn keyword rustTrait Vector VectorVector CloneableVector ImmutableVector
115
97
116
- " syn keyword rustConstant GC
98
+ " syn keyword rustFunction stream
99
+ syn keyword rustTrait Sender Receiver
100
+ " syn keyword rustFunction spawn
117
101
118
102
syn keyword rustSelf self
119
103
syn keyword rustBoolean true false
@@ -255,8 +239,6 @@ hi def link rustLifetime Special
255
239
hi def link rustInvalidBareKeyword Error
256
240
hi def link rustExternCrate rustKeyword
257
241
hi def link rustObsoleteExternMod Error
258
- hi def link rustBoxPlacementParens Delimiter
259
- hi def link rustBoxPlacementExpr rustKeyword
260
242
261
243
" Other Suggestions:
262
244
" hi rustAttribute ctermfg=cyan
0 commit comments