aboutsummaryrefslogtreecommitdiff
path: root/.bashrc
diff options
context:
space:
mode:
Diffstat (limited to '.bashrc')
-rw-r--r--.bashrc8
1 files changed, 8 insertions, 0 deletions
diff --git a/.bashrc b/.bashrc
index f0c37e4..a6b8dcf 100644
--- a/.bashrc
+++ b/.bashrc
@@ -156,3 +156,11 @@ export XDG_CONFIG_HOME="$HOME/.config"
# Add the binaries of Doom Emacs into my PATH.
export PATH=$PATH:$HOME/.emacs.d/bin
+
+# If we have Rust's source code, export the special `RUST_SRC_PATH`, since this
+# is useful for completion tools.
+if command -v rustc &> /dev/null; then
+ if [ -d "$(rustc --print sysroot)/lib/rustlib/src/rust/library" ]; then
+ export RUST_SRC_PATH="$(rustc --print sysroot)/lib/rustlib/src/rust/library"
+ fi
+fi