File tree Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -3118,6 +3118,18 @@ impl Two<'a> {
3118
3118
" b" font-lock-variable-name-face
3119
3119
" u32" font-lock-type-face )))
3120
3120
3121
+ (ert-deftest variable-in-for-loop ()
3122
+ (rust-test-font-lock
3123
+ " for var in iter"
3124
+ '(" for" font-lock-keyword-face
3125
+ " var" font-lock-variable-name-face
3126
+ " in" font-lock-keyword-face ))
3127
+ (rust-test-font-lock
3128
+ " for Foo{var} in iter"
3129
+ '(" for" font-lock-keyword-face
3130
+ " Foo" font-lock-type-face
3131
+ " in" font-lock-keyword-face )))
3132
+
3121
3133
(when (executable-find rust-cargo-bin)
3122
3134
(ert-deftest rust-test-project-located ()
3123
3135
(lexical-let* ((test-dir (expand-file-name " test-project" default-directory))
Original file line number Diff line number Diff line change @@ -700,7 +700,7 @@ Returns nil if the point is not within a Rust string."
700
700
(, rust-re-type-or-constructor 1 font-lock-type-face )
701
701
702
702
; ; Type-inferred binding
703
- (,(concat " \\ _<\\ (?:let\\ s-+ref\\ |let\\ |ref\\ )\\ s-+\\ (?:mut\\ s-+\\ )?" (rust-re-grab rust-re-ident) " \\ _>" ) 1 font-lock-variable-name-face )
703
+ (,(concat " \\ _<\\ (?:let\\ s-+ref\\ |let\\ |ref\\ |for \\ )\\ s-+\\ (?:mut\\ s-+\\ )?" (rust-re-grab rust-re-ident) " \\ _>" ) 1 font-lock-variable-name-face )
704
704
705
705
; ; Type names like `Foo::`, highlight excluding the ::
706
706
(,(rust-path-font-lock-matcher rust-re-uc-ident) 1 font-lock-type-face )
You can’t perform that action at this time.
0 commit comments