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

           (setf rust-tcat 'op) nil)
      table)))

(defun rust-single-quote ()
  (forward-char)
  (setf rust-tcat 'atom)
  ; Is this a lifetime?
  (if (or (looking-at "[a-zA-Z_]$")
          (looking-at "[a-zA-Z_][^']"))
      ; If what we see is 'abc, use font-lock-type-face:
      (progn (rust-eat-re "[a-zA-Z_][a-zA-Z_0-9]*")
             'font-lock-type-face)
    ; Otherwise, handle as a character constant:
    (let ((is-escape (eq (char-after) ?\\))
          (start (point)))

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