Skip to content

Commit dea81aa

Browse files
committed
Types get correct font-lock in if-let statements
1 parent f57a8eb commit dea81aa

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

rust-mode.el

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -682,6 +682,9 @@ match data if found. Returns nil if not within a Rust string."
682682
;; Field names like `foo:`, highlight excluding the :
683683
(,(concat (rust-re-grab rust-re-ident) ":[^:]") 1 font-lock-variable-name-face)
684684

685+
;; CamelCase Means Type Or Constructor
686+
(,rust-re-type-or-constructor 1 font-lock-type-face)
687+
685688
;; Type-inferred binding
686689
(,(concat "\\_<\\(?:let\\|ref\\)\\s-+\\(?:mut\\s-+\\)?" (rust-re-grab rust-re-ident) "\\_>") 1 font-lock-variable-name-face)
687690

@@ -694,9 +697,6 @@ match data if found. Returns nil if not within a Rust string."
694697
;; Lifetimes like `'foo`
695698
(,(concat "'" (rust-re-grab rust-re-ident) "[^']") 1 font-lock-variable-name-face)
696699

697-
;; CamelCase Means Type Or Constructor
698-
(,rust-re-type-or-constructor 1 font-lock-type-face)
699-
700700
;; Question mark operator
701701
("\\?" . 'rust-question-mark-face)
702702
)

0 commit comments

Comments
 (0)