language: rust
cache: cargo
rust:
    - stable
    - beta
    - nightly
os:
    - linux
    - osx

before_script:
    - |
      (travis_wait rustup component add rustfmt-preview || true) &&
      (test "$TRAVIS_RUST_VERSION" != nightly || travis_wait cargo install --force clippy || true)

script:
    - |
      export PATH="$PATH":~/.cargo/bin &&
      export RUST_BACKTRACE=1 &&
      export CARGO_INCREMENTAL=1 &&
      cargo build &&
      cargo test &&
      cargo doc --no-deps &&
      (test "$TRAVIS_RUST_VERSION" != nightly || cargo clippy -- --deny clippy) &&
      (test "$TRAVIS_RUST_VERSION" != nightly || cargo fmt)

matrix:
    allow_failures:
        - rust: nightly

language: rust
cache: cargo
rust:
    - stable
    - beta
    - nightly
os:
    - linux
    - osx

before_script:
    - |
      (travis_wait rustup component add rustfmt-preview || true) &&
      (test "$TRAVIS_RUST_VERSION" != nightly || travis_wait rustup component add clippy-preview || true)

script:
    - |
      export PATH="$PATH":~/.cargo/bin &&
      export RUST_BACKTRACE=1 &&
      export CARGO_INCREMENTAL=1 &&
      cargo build &&
      cargo test &&
      cargo doc --no-deps &&
      (test "$TRAVIS_RUST_VERSION" != nightly || cargo clippy -- --deny clippy) &&
      (test "$TRAVIS_RUST_VERSION" != nightly || cargo fmt)

matrix:
    allow_failures:
        - rust: nightly

Use precompiled clippy for CI
Use precompiled clippy for CI
