language: rust rust: - stable - beta - nightly cache: cargo matrix: allow_failures: - rust: nightly before_script: - export PATH="$PATH:$HOME/.cargo/bin" - which rustfmt || cargo install rustfmt-nightly script: - (test $TRAVIS_RUST_VERSION != "nightly" || cargo fmt) - cargo build - cargo test