                  ((rust-eat-re "[a-z_]+") (setf rust-tcat 'macro)))
            'font-lock-preprocessor-face)
       (def ((?a . ?z) (?A . ?Z) ?_)
-           (rust-eat-re "[a-zA-Z_][a-zA-Z0-9_]*")
-           (setf rust-tcat 'ident)
-           (if (and (eq (char-after) ?:) (eq (char-after (+ (point) 1)) ?:)
-                    (not (eq (char-after (+ (point) 2)) ?:)))
-               (progn (forward-char 2) 'font-lock-builtin-face)
-             (match-string 0)))
+           (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)

(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-token (st)
  (let ((cx (car (rust-state-context st))))

        (setf tok (cond ((eq tok-id 'atom) 'font-lock-constant-face)
                        (tok-id 'font-lock-keyword-face)
                        ((equal (rust-state-last-token st) 'def) 'font-lock-function-name-face)
                        ((and rust-capitalized-idents-are-types
                              (rust-is-capitalized tok)) 'font-lock-type-face)
                        (t nil))))
      (when rust-tcat
        (when (eq (rust-context-align cx) 'unset)
