            (setf rust-tcat 'op) nil)
       table)))
 
+(defun rust-token-identifier ()
+  (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)))
+
 (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:
+      ; If what we see is 'abc, use font-lock-builtin-face:
       (progn (rust-eat-re "[a-zA-Z_][a-zA-Z_0-9]*")
-             'font-lock-type-face)
+             'font-lock-builtin-face)
     ; Otherwise, handle as a character constant:
     (let ((is-escape (eq (char-after) ?\\))
           (start (point)))

        (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)
                        (t nil))))
      (when rust-tcat
        (when (eq (rust-context-align cx) 'unset)

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