From cda046507df689c26999e9c8e301abbe6ff7807f Mon Sep 17 00:00:00 2001 From: Chris Connelly Date: Fri, 10 Sep 2021 01:36:47 +0100 Subject: [PATCH 1/2] Add `min_const_gen` to "all stable features" test invocation `min_const_gen` is a stable feature, but was not added to this test invocation when it was introduced. Unblocks #1173. --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index eaee94097d7..c792c3a94ae 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -83,7 +83,7 @@ jobs: cargo build --target ${{ matrix.target }} --no-default-features --features alloc,getrandom,small_rng cargo test --target ${{ matrix.target }} --lib --tests --no-default-features --features=alloc,getrandom,small_rng # all stable features: - cargo test --target ${{ matrix.target }} --features=serde1,log,small_rng + cargo test --target ${{ matrix.target }} --features=serde1,log,small_rng,min_const_gen cargo test --target ${{ matrix.target }} --examples - name: Test rand_core run: | From 9cbcfe4725f18cde4c0f7849463dcce748847e5f Mon Sep 17 00:00:00 2001 From: Chris Connelly Date: Fri, 10 Sep 2021 17:30:13 +0100 Subject: [PATCH 2/2] Split all feature test invocation for MSRV and non-MSRV Since const generics are not stable in Rust 1.36.0, we cannot use the `min_const_gen` feature when testing the MSRV. --- .github/workflows/test.yml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index c792c3a94ae..28ff439eda0 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -82,9 +82,16 @@ jobs: cargo test --target ${{ matrix.target }} --lib --tests --no-default-features cargo build --target ${{ matrix.target }} --no-default-features --features alloc,getrandom,small_rng cargo test --target ${{ matrix.target }} --lib --tests --no-default-features --features=alloc,getrandom,small_rng - # all stable features: - cargo test --target ${{ matrix.target }} --features=serde1,log,small_rng,min_const_gen cargo test --target ${{ matrix.target }} --examples + - name: Test rand (all stable features, non-MSRV) + if: ${{ matrix.toolchain != '1.36.0' }} + run: | + cargo test --target ${{ matrix.target }} --features=serde1,log,small_rng,min_const_gen + - name: Test rand (all stable features, MSRV) + if: ${{ matrix.toolchain == '1.36.0' }} + run: | + # const generics are not stable on 1.36.0 + cargo test --target ${{ matrix.target }} --features=serde1,log,small_rng - name: Test rand_core run: | cargo test --target ${{ matrix.target }} --manifest-path rand_core/Cargo.toml