Skip to content

Commit f34bf43

Browse files
committed
handle comments around parameters and types in general
1 parent adc8c5d commit f34bf43

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

RustEnhanced.sublime-syntax

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -446,6 +446,7 @@ contexts:
446446
pop: true
447447

448448
type-any-identifier:
449+
- include: comments
449450
- include: support-type
450451
- include: return-type
451452
- match: '&'

syntax_test_rust.rs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1097,4 +1097,11 @@ where
10971097
T: AsRef<str>;
10981098
//^^^^^^^^^^^^^^^ meta.struct
10991099
// ^^^ meta.struct meta.where storage.type
1100-
// ^ punctuation.terminator
1100+
// ^ punctuation.terminator
1101+
1102+
fn foo<F: FnMut(i32, i32 /*asd*/) -> i32>(f: F) {
1103+
// ^^^^^^^ meta.generic comment
1104+
let lam = |time: i32 /* comment */, other: i32| {
1105+
// ^^^^^^^^^^^^^ meta.function.parameters comment
1106+
};
1107+
}

0 commit comments

Comments
 (0)