diff --git a/RustEnhanced.sublime-syntax b/RustEnhanced.sublime-syntax index 96db8f4f..dcf0f934 100644 --- a/RustEnhanced.sublime-syntax +++ b/RustEnhanced.sublime-syntax @@ -446,6 +446,7 @@ contexts: pop: true type-any-identifier: + - include: comments - include: support-type - include: return-type - match: '&' diff --git a/syntax_test_rust.rs b/syntax_test_rust.rs index 538ad41f..3056aa30 100644 --- a/syntax_test_rust.rs +++ b/syntax_test_rust.rs @@ -1097,4 +1097,11 @@ where T: AsRef; //^^^^^^^^^^^^^^^ meta.struct // ^^^ meta.struct meta.where storage.type -// ^ punctuation.terminator \ No newline at end of file +// ^ punctuation.terminator + +fn foo i32>(f: F) { +// ^^^^^^^ meta.generic comment + let lam = |time: i32 /* comment */, other: i32| { +// ^^^^^^^^^^^^^ meta.function.parameters comment + }; +}