 (defun rust-next-block-info (st)
   (dolist (cx (rust-state-context st))
     (when (eq (rust-context-type cx) ?\}) (return (rust-context-info cx)))))
+
+(defun rust-is-capitalized (string)
+  (let ((case-fold-search nil))
+    (string-match-p "[A-Z]" string)))
 
 (defun rust-token (st)
   (let ((cx (car (rust-state-context st))))


(require 'cm-mode)
(require 'cc-mode)
(eval-when-compile (require 'cl))

(defun rust-electric-brace (arg)
  (interactive "*P")

                 ((rust-eat-re "[a-z_]+") (setf rust-tcat 'macro)))
           'font-lock-preprocessor-face)
      (def ((?a . ?z) (?A . ?Z) ?_)
           (rust-token-identifier))
      (def ((?0 . ?9))
           (rust-eat-re "0x[0-9a-fA-F_]+\\|0b[01_]+\\|[0-9_]+\\(\\.[0-9_]+\\)?\\(e[+\\-]?[0-9_]+\\)?")
           (setf rust-tcat 'atom)
