File tree 2 files changed +18
-1
lines changed
2 files changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -376,9 +376,10 @@ contexts:
376
376
# scope as soon as we hit something that it not a
377
377
# valid part so the whole rest of the document isn't
378
378
# highlighted using the params scope
379
+ - include : comments
379
380
- match : ' (?=\()'
380
381
push : group
381
- - match : ' (?=[};)\]\n ])'
382
+ - match : ' (?=[};)\]])'
382
383
pop : true
383
384
- match : ' \|'
384
385
scope : punctuation.definition.parameters.end.rust
Original file line number Diff line number Diff line change @@ -1558,3 +1558,19 @@ type A3 = dyn<<dyn as dyn>::dyn>;
1558
1558
// ^^^ meta.generic storage.type.trait
1559
1559
// ^^^ meta.generic -storage.type.trait
1560
1560
// ^^^ meta.generic -storage.type.trait
1561
+
1562
+ fn lambdas( ) {
1563
+ let c = |foo,
1564
+ // ^ meta.function.closure meta.function.parameters punctuation.definition.parameters.begin
1565
+ // ^^^ meta.function.parameters variable.parameter
1566
+ bar| { } ;
1567
+ // ^^^ meta.function.parameters variable.parameter
1568
+ // ^ meta.function.closure meta.function.parameters punctuation.definition.parameters.end
1569
+ let c = |foo, // weird, but should work
1570
+ // ^ meta.function.closure meta.function.parameters punctuation.definition.parameters.begin
1571
+ // ^^^ meta.function.parameters variable.parameter
1572
+ // ^^^^^^^^^^^^^^^^^^^^^^^^^ comment.line
1573
+ bar| { } ;
1574
+ // ^^^ meta.function.parameters variable.parameter
1575
+ // ^ meta.function.closure meta.function.parameters punctuation.definition.parameters.end
1576
+ }
You can’t perform that action at this time.
0 commit comments