summaryrefslogtreecommitdiff
path: root/rust-mode-tests.el
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2017-05-14 21:22:05 -0600
committerGitHub <noreply@github.com>2017-05-14 21:22:05 -0600
commit3220937aca17fd3200c9616d97a3484f55b604d5 (patch)
treeed970e4f49750b78e47650677c57f1226e0827ca /rust-mode-tests.el
parentdae5af71ebf4b5c6797ef057e8a0ebf655bcdbfb (diff)
parent758ab8c6aaa04802223db1eca8c1f7f76c13727d (diff)
downloadrust-mode-3220937aca17fd3200c9616d97a3484f55b604d5.tar.gz
Merge pull request #209 from tromey/default-keyword
Add support for "default" keyword
Diffstat (limited to 'rust-mode-tests.el')
-rw-r--r--rust-mode-tests.el9
1 files changed, 9 insertions, 0 deletions
diff --git a/rust-mode-tests.el b/rust-mode-tests.el
index 5abd4a7..6d58906 100644
--- a/rust-mode-tests.el
+++ b/rust-mode-tests.el
@@ -1510,6 +1510,15 @@ this_is_not_a_string();)"
;; Only the i32 should have been highlighted.
'("i32" font-lock-type-face)))
+(ert-deftest rust-test-default-context-sensitive ()
+ (rust-test-font-lock
+ "let default = 7; impl foo { default fn f() { } }"
+ '("let" font-lock-keyword-face
+ "impl" font-lock-keyword-face
+ "default" font-lock-keyword-face
+ "fn" font-lock-keyword-face
+ "f" font-lock-function-name-face)))
+
(ert-deftest indent-method-chains-no-align ()
(let ((rust-indent-method-chain nil)) (test-indent
"