I'm unable to install rustfmt on Windows on either stable or nightly, but I am able to install rustfmt-preview. I'm using a couple tools (cargo-expand, mostly) that have asked me to install rustfmt, but the commands they give me don't work.
$ rustup self update
info: checking for self-updates
$ rustup --version
rustup 1.16.0 (beab5ac2b 2018-12-06)
$ rustup component add rustfmt
error: toolchain 'stable-x86_64-pc-windows-msvc' does not contain component 'rustfmt' for target 'x86_64-pc-windows-msvc'
$ rustup component add rustfmt --toolchain nightly
error: toolchain 'nightly-x86_64-pc-windows-msvc' does not contain component 'rustfmt' for target 'x86_64-pc-windows-msvc'
Could you please try removing toolchains, then reinstall them?
# e.g. reinstalling stable
rustup toolchain remove stable
rustup toolchain install stable
rustup component add rustfmt --toolchain stable
That worked, thanks!
Is there an existing tracking issue for rustup for trying to figure out what could be causing this kind of issue?
Not that I am aware of.
Most helpful comment
That worked, thanks!
Is there an existing tracking issue for rustup for trying to figure out what could be causing this kind of issue?