From e40ce2c3e71de81f4f6aab8389f3bbdaac7b4da0 Mon Sep 17 00:00:00 2001 From: Taiki Endo Date: Sat, 6 Jan 2024 20:06:10 +0900 Subject: [PATCH] Update CI config and fix CI failure (#101) --- .github/workflows/ci.yml | 26 +++++++------------ .github/workflows/release.yml | 2 +- async-stream/tests/ui/yield_in_async.stderr | 2 +- async-stream/tests/ui/yield_in_closure.stderr | 6 ++--- .../tests/ui/yield_in_nested_fn.stderr | 2 +- 5 files changed, 16 insertions(+), 22 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 292e520..4b890d2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,48 +8,42 @@ on: branches: - master schedule: - - cron: '0 2 * * *' + - cron: '0 2 * * 0' env: RUSTFLAGS: -Dwarnings RUST_BACKTRACE: 1 - # This is the minimum supported Rust version of this crate. - # When updating this, the reminder to update the minimum supported - # Rust version in README.md, Cargo.toml, and .clippy.toml. - minrust: '1.56' jobs: test: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Install Rust run: rustup update stable - run: rustup component add rust-src - run: cargo test --all-features minrust: - env: - CARGO_NET_GIT_FETCH_WITH_CLI: true runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - name: Install Rust - run: rustup update ${{ env.minrust }} && rustup default ${{ env.minrust }} - - run: cargo build --all-features + - uses: actions/checkout@v4 + - name: Install cargo-hack + uses: taiki-e/install-action@cargo-hack + - run: cargo hack build --all-features --ignore-private --rust-version fmt: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Install Rust run: rustup update stable - - run: cargo fmt --all -- --check + - run: cargo fmt --all --check clippy: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Install Rust run: rustup update stable - run: cargo clippy --all-features @@ -57,7 +51,7 @@ jobs: docs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Install Rust run: rustup update nightly && rustup default nightly - run: cargo doc --no-deps --all-features diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ebd167a..2b14065 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -10,7 +10,7 @@ jobs: if: github.repository_owner == 'tokio-rs' runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: taiki-e/create-gh-release-action@v1 with: changelog: async-stream/CHANGELOG.md diff --git a/async-stream/tests/ui/yield_in_async.stderr b/async-stream/tests/ui/yield_in_async.stderr index 4322758..2485331 100644 --- a/async-stream/tests/ui/yield_in_async.stderr +++ b/async-stream/tests/ui/yield_in_async.stderr @@ -6,7 +6,7 @@ error[E0658]: yield syntax is experimental | = note: see issue #43122 for more information -error[E0727]: `async` generators are not yet supported +error[E0727]: `async` coroutines are not yet supported --> tests/ui/yield_in_async.rs:6:13 | 6 | yield 123; diff --git a/async-stream/tests/ui/yield_in_closure.stderr b/async-stream/tests/ui/yield_in_closure.stderr index 9f917f3..2feb6ae 100644 --- a/async-stream/tests/ui/yield_in_closure.stderr +++ b/async-stream/tests/ui/yield_in_closure.stderr @@ -6,7 +6,7 @@ error[E0658]: yield syntax is experimental | = note: see issue #43122 for more information -error[E0277]: expected a `FnOnce<(&str,)>` closure, found `[generator@$DIR/tests/ui/yield_in_closure.rs:6:23: 6:26]` +error[E0277]: expected a `FnOnce(&str)` closure, found `{coroutine@$DIR/tests/ui/yield_in_closure.rs:6:23: 6:26}` --> tests/ui/yield_in_closure.rs:6:23 | 6 | .and_then(|v| { @@ -16,9 +16,9 @@ error[E0277]: expected a `FnOnce<(&str,)>` closure, found `[generator@$DIR/tests 7 | | yield v; 8 | | Ok(()) 9 | | }); - | |_____________^ expected an `FnOnce<(&str,)>` closure, found `[generator@$DIR/tests/ui/yield_in_closure.rs:6:23: 6:26]` + | |_____________^ expected an `FnOnce(&str)` closure, found `{coroutine@$DIR/tests/ui/yield_in_closure.rs:6:23: 6:26}` | - = help: the trait `FnOnce<(&str,)>` is not implemented for `[generator@$DIR/tests/ui/yield_in_closure.rs:6:23: 6:26]` + = help: the trait `FnOnce<(&str,)>` is not implemented for `{coroutine@$DIR/tests/ui/yield_in_closure.rs:6:23: 6:26}` note: required by a bound in `Result::::and_then` --> $RUST/core/src/result.rs | diff --git a/async-stream/tests/ui/yield_in_nested_fn.stderr b/async-stream/tests/ui/yield_in_nested_fn.stderr index 54fdee9..1fb4deb 100644 --- a/async-stream/tests/ui/yield_in_nested_fn.stderr +++ b/async-stream/tests/ui/yield_in_nested_fn.stderr @@ -6,7 +6,7 @@ error[E0658]: yield syntax is experimental | = note: see issue #43122 for more information -error[E0627]: yield expression outside of generator literal +error[E0627]: yield expression outside of coroutine literal --> tests/ui/yield_in_nested_fn.rs:6:13 | 6 | yield "hello";