File tree Expand file tree Collapse file tree 2 files changed +23
-10
lines changed Expand file tree Collapse file tree 2 files changed +23
-10
lines changed Original file line number Diff line number Diff line change 76
76
' name' : ' storage.modifier.box.rust'
77
77
' match' : ' \\ bbox\\ b'
78
78
}
79
+ ' const' : {
80
+ ' comment' : ' Const storage modifier'
81
+ ' name' : ' storage.modifier.const.rust'
82
+ ' match' : ' \\ bconst\\ b'
83
+ }
84
+ ' pub' : {
85
+ ' comment' : ' Visibility modifier'
86
+ ' name' : ' storage.modifier.visibility.rust'
87
+ ' match' : ' \\ bpub\\ b'
88
+ }
79
89
' lifetime' : {
80
90
' comment' : ' Named lifetime'
81
91
' name' : ' storage.modifier.lifetime.rust'
209
219
' name' : ' storage.modifier.static.rust'
210
220
' match' : ' \\ bstatic\\ b'
211
221
}
212
- {
213
- ' comment' : ' Const storage modifier'
214
- ' name' : ' storage.modifier.const.rust'
215
- ' match' : ' \\ bconst\\ b'
216
- }
217
- {
218
- ' comment' : ' Visibility modifier'
219
- ' name' : ' storage.modifier.visibility.rust'
220
- ' match' : ' \\ bpub\\ b'
221
- }
222
222
{
223
223
' comment' : ' Boolean constant'
224
224
' name' : ' constant.language.boolean.rust'
245
245
{ ' include' : ' #box' }
246
246
{ ' include' : ' #lifetime' }
247
247
{ ' include' : ' #ref_lifetime' }
248
+ { ' include' : ' #const' }
249
+ { ' include' : ' #pub' }
248
250
# Operators
249
251
{
250
252
' comment' : ' Operator'
317
319
{ ' include' : ' #std_types' }
318
320
{ ' include' : ' #std_traits' }
319
321
{ ' include' : ' #type_params' }
322
+ { ' include' : ' #const' }
320
323
]
321
324
}
322
325
# Type declaration
334
337
{ ' include' : ' #core_traits' }
335
338
{ ' include' : ' #std_traits' }
336
339
{ ' include' : ' #type_params' }
340
+ { ' include' : ' #core_types' }
341
+ { ' include' : ' #pub' }
337
342
]
338
343
}
339
344
# Type alias
Original file line number Diff line number Diff line change @@ -207,3 +207,11 @@ let x: Vec<Vec<u8>> = Vec::new();
207
207
// Correct detection of == (#40)
208
208
struct Foo { x : i32 }
209
209
if x == 1 { }
210
+
211
+ // const function parameter (#52)
212
+ fn foo ( bar : * const i32 ) {
213
+ let _ = 1234 as * const u32 ;
214
+ }
215
+
216
+ // Keywords and known types in wrapper structs (#56)
217
+ pub struct Foobar ( pub Option < bool > ) ;
You can’t perform that action at this time.
0 commit comments