Skip to content

Commit

Permalink
fix font-locking for dependent traits
Browse files Browse the repository at this point in the history
and type parameters with trait bounds etc.
  • Loading branch information
Arash committed Dec 17, 2018
1 parent 12cb169 commit 9e8b23f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions rust-mode.el
Original file line number Diff line number Diff line change
Expand Up @@ -679,12 +679,12 @@ Returns nil if the point is not within a Rust string."
(,(concat (rust-re-grab (concat rust-re-ident "!")) "[({[:space:][]")
1 font-lock-preprocessor-face)

;; 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)

;; Field names like `foo:`, highlight excluding the :
(,(concat (rust-re-grab rust-re-ident) ":[^:]") 1 font-lock-variable-name-face)

;; Type-inferred binding
(,(concat "\\_<\\(?:let\\s-+ref\\|let\\|ref\\)\\s-+\\(?:mut\\s-+\\)?" (rust-re-grab rust-re-ident) "\\_>") 1 font-lock-variable-name-face)

Expand Down Expand Up @@ -1581,7 +1581,7 @@ This is written mainly to be used as `end-of-defun-function' for Rust."
(when rust-format-on-save
(unless (executable-find rust-rustfmt-bin)
(error "Could not locate executable \"%s\"" rust-rustfmt-bin))))

(defvar rustc-compilation-regexps
(let ((file "\\([^\n]+\\)")
(start-line "\\([0-9]+\\)")
Expand Down

0 comments on commit 9e8b23f

Please sign in to comment.