 
         ;; If we are at top level and not in any list, it can't be a closing
         ;; angle bracket
-        ((>= 0 (rust-paren-level)) t)
+        ((>= 0 (reason-paren-level)) t)
 
         ;; Otherwise, treat the > as a closing angle bracket if it would
         ;; match an opening one

      (current-column))))

(defun rust-rewind-to-beginning-of-current-level-expr ()
  (let ((current-level (rust-paren-level)))
    (back-to-indentation)
    (when (looking-at "->")
      (rust-rewind-irrelevant)
      (back-to-indentation))
    (while (> (rust-paren-level) current-level)
      (backward-up-list)
      (back-to-indentation))
    ;; When we're in the where clause, skip over it.  First find out the start

(defun rust-rewind-qualified-ident ()
  (while (rust-looking-back-ident)
    (backward-sexp)
    (when (save-excursion (reason-rewind-irrelevant) (rust-looking-back-str "::"))
      (reason-rewind-irrelevant)
      (backward-char 2)
      (reason-rewind-irrelevant))))

(defun rust-rewind-type-param-list ()
  (cond
   ((and (rust-looking-back-str ">") (equal 5 (rust-syntax-class-before-point)))
    (backward-sexp)
    (reason-rewind-irrelevant))

   ;; We need to be able to back up past the Fn(args) -> RT form as well.  If
   ;; we're looking back at this, we want to end up just after "Fn".
