File tree Expand file tree Collapse file tree 2 files changed +17
-0
lines changed Expand file tree Collapse file tree 2 files changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -365,6 +365,10 @@ contexts:
365
365
366
366
generic-angles :
367
367
- meta_scope : meta.generic.rust
368
+ # -> to cover https://doc.rust-lang.org/std/boxed/trait.FnBox.html
369
+ - match : ' ->'
370
+ scope : punctuation.separator.generic.rust
371
+ push : generic-angles-contents
368
372
- match : ' >'
369
373
scope : punctuation.definition.generic.end.rust
370
374
pop : true
Original file line number Diff line number Diff line change @@ -211,6 +211,19 @@ struct PrintableStruct(Box<i32>);
211
211
// ^ punctuation.definition.generic.end
212
212
// ^ punctuation.definition.group.end
213
213
214
+
215
+ // fixes https://github.com/rust-lang/sublime-rust/issues/144
216
+ fn factory ( ) -> Box < Fn ( i32 ) -> i32 > {
217
+ // <- storage.type.function
218
+ // ^^^^^^^ entity.name.function
219
+ // ^^^^^^^^^^^^^^ meta.generic
220
+ // ^^ storage.type
221
+ // ^^ storage.type
222
+ // ^^ punctuation.separator.generic
223
+
224
+ Box :: new ( |x| x + 1 )
225
+ }
226
+
214
227
impl fmt:: Display for PrintableStruct {
215
228
// <- meta.impl
216
229
//^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.impl
You can’t perform that action at this time.
0 commit comments