2504: Use rustup toolchain install instead of rustup install r=matklad a=edwin0cheng

`rustup install` and `rustup uninstall` are going to be deprecated in rustup 1.21.0

See https://github.com/rust-lang/rustup/issues/2148

and https://www.reddit.com/r/rust/comments/e7rer9/we_need_your_help_before_rustup_1210_can_be/



Co-authored-by: Edwin Cheng <edwin0cheng@gmail.com>
This commit is contained in:
bors[bot] 2019-12-08 16:36:11 +00:00 committed by GitHub
commit d27b033883
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -79,7 +79,7 @@ pub fn run_rustfmt(mode: Mode) -> Result<()> {
}
pub fn install_rustfmt() -> Result<()> {
run(&format!("rustup install {}", TOOLCHAIN), ".")?;
run(&format!("rustup toolchain install {}", TOOLCHAIN), ".")?;
run(&format!("rustup component add rustfmt --toolchain {}", TOOLCHAIN), ".")
}
@ -125,7 +125,7 @@ pub fn run_clippy() -> Result<()> {
}
pub fn install_clippy() -> Result<()> {
run(&format!("rustup install {}", TOOLCHAIN), ".")?;
run(&format!("rustup toolchain install {}", TOOLCHAIN), ".")?;
run(&format!("rustup component add clippy --toolchain {}", TOOLCHAIN), ".")
}