Call rustc through rustup run

On recent versions of `rustc`, the `+toolchain` option has disapear. To
prevent the command from issuing an empty string, call `rustc` through
`rustup`.
This commit is contained in:
Thomas WACHE 2025-01-10 13:59:48 +01:00
commit 9e97e9c5b0

View file

@ -22,5 +22,5 @@ fi
rustup completions zsh >| "$ZSH_CACHE_DIR/completions/_rustup" &|
cat >| "$ZSH_CACHE_DIR/completions/_cargo" <<'EOF'
#compdef cargo
source "$(rustc +${${(z)$(rustup default)}[1]} --print sysroot)"/share/zsh/site-functions/_cargo
source "$(rustup run ${${(z)$(rustup default)}[1]} rustc --print sysroot)"/share/zsh/site-functions/_cargo
EOF