From c0cd13bd9b0ca41c96bb98caff0b556e6534e91b Mon Sep 17 00:00:00 2001 From: Wilfred Hughes Date: Wed, 27 Oct 2021 23:47:25 -0700 Subject: [PATCH] Pin Rust version to 1.46 Specify the minimum Rust version in cargo.toml, exercise this version in CI, and document it in the manual. We require 1.46 for bitflags, which is a dependency of clap. Fixes #51 --- .github/workflows/test.yml | 9 +++++---- Cargo.toml | 1 + manual/src/getting_started.md | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 8b1c5aaaa..7900981cc 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -11,7 +11,7 @@ jobs: - uses: actions-rs/toolchain@v1 with: profile: minimal - toolchain: stable + toolchain: 1.46.0 override: true - uses: actions-rs/cargo@v1 with: @@ -25,7 +25,7 @@ jobs: - uses: actions-rs/toolchain@v1 with: profile: minimal - toolchain: stable + toolchain: 1.46.0 override: true - uses: actions-rs/cargo@v1 with: @@ -39,11 +39,12 @@ jobs: - uses: actions-rs/toolchain@v1 with: profile: minimal - toolchain: stable + toolchain: 1.46.0 override: true - uses: actions-rs/cargo@v1 with: command: package + args: --allow-dirty fmt: name: Rustfmt @@ -53,7 +54,7 @@ jobs: - uses: actions-rs/toolchain@v1 with: profile: minimal - toolchain: stable + toolchain: 1.46.0 override: true - run: rustup component add rustfmt - uses: actions-rs/cargo@v1 diff --git a/Cargo.toml b/Cargo.toml index 915e1610f..73b0ea76b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -9,6 +9,7 @@ authors = ["Wilfred Hughes "] keywords = ["diff", "syntax"] categories = ["development-tools", "command-line-utilities", "parser-implementations"] edition = "2018" +rust-version = "1.46.0" include = [ "/build.rs", "/src/", diff --git a/manual/src/getting_started.md b/manual/src/getting_started.md index e7d6e43bf..ef4ca9275 100644 --- a/manual/src/getting_started.md +++ b/manual/src/getting_started.md @@ -4,7 +4,7 @@ The latest version of difftastic is [available on crates.io](https://crates.io/crates/difftastic). You can install it -with Cargo. +with Cargo. Difftastic requires Rust 1.46 or later. ``` $ cargo install difftastic