diff options
| author | Konstantin Kharlamov <Hi-Angel@users.noreply.github.com> | 2019-10-10 11:32:16 +0300 |
|---|---|---|
| committer | Nathan Moreau <nathan.moreau@m4x.org> | 2019-10-10 10:32:16 +0200 |
| commit | 74c264783e25166055a7871a00e4f68fe0495a0d (patch) | |
| tree | 7558eac4b51b14b6ad5f779cb6d418bee5feabca /rust-mode-tests.el | |
| parent | 897af2444c0f7d8e7059632977402022c9b00ed9 (diff) | |
| download | rust-mode-74c264783e25166055a7871a00e4f68fe0495a0d.tar.gz | |
Highlight variable name in a for-loop (#326)
Signed-off-by: Konstantin Kharlamov <Hi-Angel@yandex.ru>
Diffstat (limited to 'rust-mode-tests.el')
| -rw-r--r-- | rust-mode-tests.el | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/rust-mode-tests.el b/rust-mode-tests.el index 0c1ad1d..a22e43a 100644 --- a/rust-mode-tests.el +++ b/rust-mode-tests.el @@ -3118,6 +3118,18 @@ impl Two<'a> { "b" font-lock-variable-name-face "u32" font-lock-type-face))) +(ert-deftest variable-in-for-loop () + (rust-test-font-lock + "for var in iter" + '("for" font-lock-keyword-face + "var" font-lock-variable-name-face + "in" font-lock-keyword-face)) + (rust-test-font-lock + "for Foo{var} in iter" + '("for" font-lock-keyword-face + "Foo" font-lock-type-face + "in" font-lock-keyword-face))) + (when (executable-find rust-cargo-bin) (ert-deftest rust-test-project-located () (lexical-let* ((test-dir (expand-file-name "test-project" default-directory)) |
