summaryrefslogtreecommitdiff
path: root/rust-mode.el
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2017-08-22 06:33:48 -0600
committerGitHub <noreply@github.com>2017-08-22 06:33:48 -0600
commit7ff04a8d26104c2e2c0737e219b320ecaeaafd9d (patch)
tree82ff4eefb3ddb5329457d056480bb871956d3245 /rust-mode.el
parentf57a8ebfc33de72e0ca6fe61ed3d7a622510b5b3 (diff)
parent6550d942eca7ce145c95aaaca9c44dd138b14623 (diff)
downloadrust-mode-7ff04a8d26104c2e2c0737e219b320ecaeaafd9d.tar.gz
Merge pull request #234 from jjwest/master
Types get correct font-lock in if-let statements
Diffstat (limited to 'rust-mode.el')
-rw-r--r--rust-mode.el6
1 files changed, 3 insertions, 3 deletions
diff --git a/rust-mode.el b/rust-mode.el
index 97b5c3c..72109e5 100644
--- a/rust-mode.el
+++ b/rust-mode.el
@@ -682,6 +682,9 @@ match data if found. Returns nil if not within a Rust string."
;; Field names like `foo:`, highlight excluding the :
(,(concat (rust-re-grab rust-re-ident) ":[^:]") 1 font-lock-variable-name-face)
+ ;; CamelCase Means Type Or Constructor
+ (,rust-re-type-or-constructor 1 font-lock-type-face)
+
;; Type-inferred binding
(,(concat "\\_<\\(?:let\\|ref\\)\\s-+\\(?:mut\\s-+\\)?" (rust-re-grab rust-re-ident) "\\_>") 1 font-lock-variable-name-face)
@@ -694,9 +697,6 @@ match data if found. Returns nil if not within a Rust string."
;; Lifetimes like `'foo`
(,(concat "'" (rust-re-grab rust-re-ident) "[^']") 1 font-lock-variable-name-face)
- ;; CamelCase Means Type Or Constructor
- (,rust-re-type-or-constructor 1 font-lock-type-face)
-
;; Question mark operator
("\\?" . 'rust-question-mark-face)
)