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

             (not (member (get-text-property (point) 'face)
                          '(font-lock-comment-face font-lock-string-face))))
    (cm-indent)))

(defvar rust-indent-unit 4)
(defvar rust-syntax-table (let ((table (make-syntax-table)))


(require 'cm-mode)
(require 'cc-mode)

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