diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 1211692fa38..20c15c72fc7 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -28,11 +28,11 @@ jobs: - name: Set env vars run: | source ci/rust-version.sh - echo "RUST_STABLE=$rust_stable" >> $GITHUB_ENV + echo "RUST_NIGHTLY=$rust_nightly" >> $GITHUB_ENV - uses: actions-rs/toolchain@v1 with: - toolchain: ${{ env.RUST_STABLE }} + toolchain: ${{ env.RUST_NIGHTLY }} override: true profile: minimal components: rustfmt diff --git a/cargo-nightly.sh b/cargo-nightly.sh new file mode 100644 index 00000000000..fc885367b67 --- /dev/null +++ b/cargo-nightly.sh @@ -0,0 +1,8 @@ +#!/usr/bin/env bash + +here=$(dirname "$0") +source "${here}"/ci/rust-version.sh nightly +# shellcheck disable=SC2054 # rust_nightly is sourced from rust-version.sh +toolchain="$rust_nightly" +set -x +exec cargo "+${toolchain}" "${@}" \ No newline at end of file diff --git a/rustfmt.toml b/rustfmt.toml new file mode 100644 index 00000000000..36c419bb3e5 --- /dev/null +++ b/rustfmt.toml @@ -0,0 +1 @@ +edition = "2021" \ No newline at end of file