]> git.lizzy.rs Git - rust.git/blobdiff - .travis.yml
Normalize lint messages
[rust.git] / .travis.yml
index f202bb0ad9fec4e8a5344b43cfd3a7e812b60b63..bd3003d45977ec152a9f11c2db8b4a6adc0d211f 100644 (file)
@@ -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