   :init
   (add-hook! 'rust-mode-hook #'(racer-mode eldoc-mode flycheck-rust-setup))
   :config
-  (setq racer-cmd (expand-file-name "racer/target/release/racer" +rust-ext-dir)
-        racer-rust-src-path (expand-file-name "rust/src/" +rust-ext-dir))
+  (setq racer-cmd (expand-file-name "racer/target/release/racer" +rust-src-dir)
+        racer-rust-src-path (expand-file-name "rust/src/" +rust-src-dir))
 
   (unless (file-exists-p racer-cmd)
     (warn "rust-mode: racer binary can't be found; auto-completion is disabled"))

;;; lang/rust/config.el -*- lexical-binding: t; -*-

(defvar +rust-ext-dir (concat doom-etc-dir "rust/")
  "TODO")

(def-package! rust-mode
  :mode "\\.rs$"
  :init
  (add-hook 'rust-mode-hook #'flycheck-mode)
  :config
  (set! :build 'run-cargo '(rust-mode toml-mode) #'+rust/run-cargo
    :when #'+rust-cargo-project-p))


(def-package! flycheck-rust
  :when (featurep! :feature syntax-checker)
  :after rust-mode
  :config (add-hook 'rust-mode-hook #'flycheck-mode))

