branch: elpa/rust-mode
commit 96f7f79da777618232eb8d794c46b1ff3c4c7b72
Author: Sebastian Wiesner <[email protected]>
Commit: Sebastian Wiesner <[email protected]>
Fix free-variable warnings
Constant must be defined before being used, to avoid warnings about free
variables
---
rust-mode.el | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/rust-mode.el b/rust-mode.el
index ad1af60..bb800da 100644
--- a/rust-mode.el
+++ b/rust-mode.el
@@ -104,6 +104,8 @@
(backward-up-list)
(back-to-indentation))))
+(defconst rust-re-ident
"[[:word:][:multibyte:]_][[:word:][:multibyte:]_[:digit:]]*")
+
(defun rust-align-to-method-chain ()
(save-excursion
;; for method-chain alignment to apply, we must be looking at
@@ -318,7 +320,6 @@
"bool"
"str" "char"))
-(defconst rust-re-ident
"[[:word:][:multibyte:]_][[:word:][:multibyte:]_[:digit:]]*")
(defconst rust-re-CamelCase "[[:upper:]][[:word:][:multibyte:]_[:digit:]]*")
(defun rust-re-word (inner) (concat "\\<" inner "\\>"))
(defun rust-re-grab (inner) (concat "\\(" inner "\\)"))