I have updated my local stable and nightly toolchains to the latest version. rustup component add rustfmt and rustup component add clippy both work in stable, which is great.
But I found that I cannot install rustfmt and clippy in nightly, I tried reinstall the nightly toolchain, and try install rustfmt and clippy again, but no luck.
~ $ rustup update
info: syncing channel updates for 'stable-x86_64-pc-windows-msvc'
info: syncing channel updates for 'nightly-x86_64-pc-windows-msvc'
info: checking for self-updates
stable-x86_64-pc-windows-msvc unchanged - rustc 1.31.0 (abe02cefd 2018-12-04)
nightly-x86_64-pc-windows-msvc unchanged - rustc 1.32.0-nightly (4a45578bc 2018-12-07)
~ $ rustup component add rustfmt --toolchain nightly
error: component 'rustfmt' for target 'x86_64-pc-windows-msvc' is unavailable for download
~ $ rustup component add rustfmt-preview --toolchain nightly
error: component 'rustfmt' for target 'x86_64-pc-windows-msvc' is unavailable for download
~ $ rustup component add clippy --toolchain nightly
error: component 'clippy' for target 'x86_64-pc-windows-msvc' is unavailable for download
~ $ rustup component add clippy-preview --toolchain nightly
error: component 'clippy' for target 'x86_64-pc-windows-msvc' is unavailable for download
I have a similar problem on OSX. rustfmt and clippy were installed with my previous nightly distributions, but ever since stable 1.31.0 they have shown up as missing components when I attempt to compile nightly.
Sometimes certain components of rust don't compile in nightly so they simply aren't included in that release, therefore leading to it being unavailable. I'd just wait until tomorrow or the day after to install.
It can happen. It's a nightly channel, it can crash, it can ICE, it can break your code, it can sometimes not work the intended way. Either accept that or use the stable channel
This 100%. In my opinion the Nightly compiler should print a warning with something similar every time it’s invoked. I see similar error reports pop up on a regular basis in various projects on github.