Skip to content

Commit 575bb67

Browse files
committed
Syntax: Fix lifetime for self in method.
1 parent 1fb301b commit 575bb67

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

RustEnhanced.sublime-syntax

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -319,6 +319,7 @@ contexts:
319319
scope: storage.modifier.rust
320320
- match: '@'
321321
scope: keyword.operator.rust
322+
- include: lifetime
322323
- match: '\b{{identifier}}\b(?!\s*(?:::|\{|\[|\())'
323324
scope: variable.parameter.rust
324325

tests/syntax-rust/syntax_test_functions.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,3 +106,9 @@ fn f(self,
106106
// ^ punctuation.section.brackets.end
107107
// ^ punctuation.separator
108108
{}
109+
110+
fn foo(&'a self) {}
111+
// ^^^^^^^^ meta.function meta.function.parameters
112+
// ^ keyword.operator
113+
// ^^ storage.modifier.lifetime
114+
// ^^^^ variable.parameter

0 commit comments

Comments
 (0)