Skip to content

Commit acfdb14

Browse files
committed
auto merge of #19125 : chris-morgan/rust/vim-prelude-2014-11-20, r=alexcrichton
2 parents 7765993 + dc0416e commit acfdb14

File tree

1 file changed

+27
-32
lines changed

1 file changed

+27
-32
lines changed

src/etc/vim/syntax/rust.vim

Lines changed: 27 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -66,69 +66,64 @@ syn keyword rustType f64 i8 i16 i32 i64 str Self
6666
" This section is just straight transformation of the contents of the prelude,
6767
" to make it easy to update.
6868

69-
" Core operators {{{3
69+
" Reexported core operators {{{3
7070
syn keyword rustTrait Copy Send Sized Sync
7171
syn keyword rustTrait Add Sub Mul Div Rem Neg Not
7272
syn keyword rustTrait BitAnd BitOr BitXor
7373
syn keyword rustTrait Drop Deref DerefMut
74-
syn keyword rustTrait Shl Shr Index IndexMut
75-
syn keyword rustEnum Option
76-
syn keyword rustEnumVariant Some None
77-
syn keyword rustEnum Result
78-
syn keyword rustEnumVariant Ok Err
74+
syn keyword rustTrait Shl Shr
75+
syn keyword rustTrait Index IndexMut
76+
syn keyword rustTrait Slice SliceMut
77+
syn keyword rustTrait Fn FnMut FnOnce
7978

80-
" Functions {{{3
81-
"syn keyword rustFunction from_str
82-
"syn keyword rustFunction range
79+
" Reexported functions {{{3
80+
"syn keyword rustFunction range repeat
8381
"syn keyword rustFunction drop
82+
"syn keyword rustFunction from_str
8483

85-
" Types and traits {{{3
84+
" Reexported types and traits {{{3
8685
syn keyword rustTrait Ascii AsciiCast OwnedAsciiCast AsciiStr
8786
syn keyword rustTrait IntoBytes
8887
syn keyword rustTrait ToCStr
8988
syn keyword rustTrait Char UnicodeChar
9089
syn keyword rustTrait Clone
91-
syn keyword rustTrait PartialEq PartialOrd Eq Ord Equiv
92-
syn keyword rustEnum Ordering
90+
syn keyword rustTrait PartialEq PartialOrd Eq Ord
91+
syn keyword rustEnum Ordering Equiv
9392
syn keyword rustEnumVariant Less Equal Greater
94-
syn keyword rustTrait Collection Mutable Map MutableMap MutableSeq
95-
syn keyword rustTrait Set MutableSet
96-
syn keyword rustTrait FromIterator IntoIterator Extend ExactSize
93+
syn keyword rustTrait FromIterator Extend ExactSize
9794
syn keyword rustTrait Iterator DoubleEndedIterator
9895
syn keyword rustTrait RandomAccessIterator CloneableIterator
9996
syn keyword rustTrait OrdIterator MutableDoubleEndedIterator
100-
syn keyword rustTrait NumCast Int SignedInt UnsignedInt Float
101-
syn keyword rustTrait FloatMath ToPrimitive FromPrimitive
97+
syn keyword rustTrait ToPrimitive FromPrimitive
10298
syn keyword rustTrait Box
99+
syn keyword rustEnum Option
100+
syn keyword rustEnumVariant Some None
103101
syn keyword rustTrait GenericPath Path PosixPath WindowsPath
104-
syn keyword rustTrait RawPtr
105-
syn keyword rustTrait Buffer Writer Reader Seek
106-
syn keyword rustTrait Str StrVector StrSlice
107-
syn keyword rustTrait IntoMaybeOwned StrAllocating UnicodeStrSlice
108-
syn keyword rustTrait ToString IntoString
102+
syn keyword rustTrait RawPtr RawMutPtr
103+
syn keyword rustEnum Result
104+
syn keyword rustEnumVariant Ok Err
105+
syn keyword rustTrait Buffer Writer Reader Seek BufferPrelude
106+
syn keyword rustTrait Str StrVector StrPrelude
107+
syn keyword rustTrait IntoMaybeOwned StrAllocating UnicodeStrPrelude
109108
syn keyword rustTrait Tuple1 Tuple2 Tuple3 Tuple4
110109
syn keyword rustTrait Tuple5 Tuple6 Tuple7 Tuple8
111110
syn keyword rustTrait Tuple9 Tuple10 Tuple11 Tuple12
112-
syn keyword rustTrait CloneableVector ImmutableCloneableVector
113-
syn keyword rustTrait MutableCloneableSlice MutableOrdSlice
114-
syn keyword rustTrait ImmutableSlice MutableSlice
115-
syn keyword rustTrait ImmutablePartialEqSlice ImmutableOrdSlice
116-
syn keyword rustTrait Slice VectorVector
117-
syn keyword rustTrait MutableSliceAllocating
118-
syn keyword rustTrait String
111+
syn keyword rustTrait SlicePrelude AsSlice CloneSlicePrelude
112+
syn keyword rustTrait VectorVector PartialEqSlicePrelude OrdSlicePrelude
113+
syn keyword rustTrait CloneSliceAllocPrelude OrdSliceAllocPrelude SliceAllocPrelude
114+
syn keyword rustTrait IntoString String ToString
119115
syn keyword rustTrait Vec
120116

117+
" Reexported runtime types {{{3
121118
"syn keyword rustFunction sync_channel channel
122119
syn keyword rustTrait SyncSender Sender Receiver
123120
"syn keyword rustFunction spawn
124121

125-
"syn keyword rustConstant GC
122+
" Other syntax {{{2
126123

127124
syn keyword rustSelf self
128125
syn keyword rustBoolean true false
129126

130-
" Other syntax {{{2
131-
132127
" If foo::bar changes to foo.bar, change this ("::" to "\.").
133128
" If foo::bar changes to Foo::bar, change this (first "\w" to "\u").
134129
syn match rustModPath "\w\(\w\)*::[^<]"he=e-3,me=e-3

0 commit comments

Comments
 (0)