about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2020-01-07 07:10:58 +0000
committerbors <bors@rust-lang.org>2020-01-07 07:10:58 +0000
commit79509bed5de053cda2e57e7ee83184f33149f24a (patch)
tree5f09896c02d2e348014083ee2359aa4129a705d9
parenta86301fbfc42831abedf1bee872720efb93c52e3 (diff)
parentabd76076b0574e3056824ac6cd38f288836a0f19 (diff)
downloadrust-79509bed5de053cda2e57e7ee83184f33149f24a.tar.gz
rust-79509bed5de053cda2e57e7ee83184f33149f24a.zip
Auto merge of #5002 - lzutao:fmt-fallout, r=flip1995
build: Use rustfmt from lastest nightly that contains it

changelog: none
-rw-r--r--.travis.yml6
1 files changed, 5 insertions, 1 deletions
diff --git a/.travis.yml b/.travis.yml
index f202bb0ad9f..bd3003d4597 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -38,7 +38,11 @@ install:
   - |
     if [[ -z ${INTEGRATION} ]]; then
       if ! rustup component add rustfmt; then
-        cargo install --git https://github.com/rust-lang/rustfmt --bin rustfmt
+        TARGET=$(rustc -Vv | awk '/host/{print $2}')
+        NIGHTLY=$(curl -s "https://rust-lang.github.io/rustup-components-history/${TARGET}/rustfmt")
+        curl -sSL "https://static.rust-lang.org/dist/${NIGHTLY}/rustfmt-nightly-${TARGET}.tar.xz" | \
+        tar -xJf - --strip-components=3 -C ~/.cargo/bin
+        rm -rf ~/.cargo/bin/doc
       fi
       if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
         . $HOME/.nvm/nvm.sh