Don't seem be to be able to install clippy via rustup.
C:\Users\Ash> rustup show
Default host: x86_64-pc-windows-msvc
stable-x86_64-pc-windows-msvc (default)
rustc 1.31.0 (abe02cefd 2018-12-04)
C:\Users\Ash> rustup component add clippy
error: toolchain 'stable-x86_64-pc-windows-msvc' does not contain component 'clippy' for target 'x86_64-pc-windows-msvc'
cc @nrc @alexcrichton
On Thu, Dec 6, 2018, 1:02 PM Ash <[email protected] wrote:
Don't seem be to be able to install clippy via rustup.
C:\Users\Ash> rustup show
Default host: x86_64-pc-windows-msvcstable-x86_64-pc-windows-msvc (default)
rustc 1.31.0 (abe02cefd 2018-12-04)
C:\Users\Ash> rustup component add clippy
error: toolchain 'stable-x86_64-pc-windows-msvc' does not contain component 'clippy' for target 'x86_64-pc-windows-msvc'—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/rust-lang/rust-clippy/issues/3503, or mute the thread
https://github.com/notifications/unsubscribe-auth/ABivSFEnU-O-dPc5J6fiZ7ivS9-MpsJPks5u2VudgaJpZM4ZHBaA
.
could you try rustup self update and then try re-installing please?
No luck:
C:\Users\Ash> rustup self update
info: checking for self-updates
info: downloading self-update
info: rustup updated successfully to 1.14.0
C:\Users\Ash> rustup component add clippy
error: toolchain 'stable-x86_64-pc-windows-msvc' does not contain component 'clippy' for target 'x86_64-pc-windows-msvc'
rustup component add clippy-preview will work.
I've found the issue and am working on it!
Same for x86_64-unknown-linux-gnu
After the last comment just checked on WSL, and can confirm it's the same for stable-x86_64-unknown-linux-gnu as well (rustup 1.16.0)
EDIT: just updated to 1.16.0 on Win10 box as well, but still have the same issue
Same for clippy on x86_64-apple-darwin. rustfmt too.
~ $ rustup component add clippy
error: toolchain 'stable-x86_64-apple-darwin' does not contain component 'clippy' for target 'x86_64-apple-darwin'
~ $ rustup component add rustfmt
error: toolchain 'stable-x86_64-apple-darwin' does not contain component 'rustfmt' for target 'x86_64-apple-darwin'
~ $ rustup component list | grep -e clippy -e rustfmt
clippy-preview-x86_64-apple-darwin
rustfmt-preview-x86_64-apple-darwin
~ $ rustup show
Default host: x86_64-apple-darwin
installed toolchains
--------------------
stable-x86_64-apple-darwin (default)
nightly-x86_64-apple-darwin
active toolchain
----------------
stable-x86_64-apple-darwin (default)
rustc 1.31.0 (abe02cefd 2018-12-04)
The solution is to completely wipe your toolchain and reinstall it.
@CryZe that's one heck of a solution, but I can confirm it worked for me on macOS Mojave. rustup self uninstall is the way to uninstall btw.
I solved this problem with following way.
rustup self uninstallrustup-init (rustup >= 1.16.0) in https://rustup.rs/rustup-init. And performing rustup self update" can't solve the problem. You must install lastest rustup-init at first time.rustup component add clippy and rustup component add rustfmt!Thanks everyone for the workarounds! I'm going to go ahead and close this issue, as it's not directly in the power of Clippy to fix this. Although not ideal, the above workarounds should work if you're running into the problem :heart_decoration:
This bit me, and I suspect it could bite others too (I almost opened an issue). Maybe add a note to the readme around the install instructions?
I just had to do this (run rustup self uninstall and then reinstall) in order to be able to install clippy on stable, after being able to install it on nightly and attempting to fix it on stable by running rustup self update, which didn't work.
rustup self uninstall
Solved my problem on WSL
Most helpful comment
I solved this problem with following way.
rustup self uninstallrustup-init(rustup >= 1.16.0) in https://rustup.rs/rustup-init. And performingrustup self update" can't solve the problem. You must install lastestrustup-initat first time.rustup component add clippyandrustup component add rustfmt!