diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 063ac0f..36c315a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,23 +9,15 @@ env: RUSTFLAGS: -Dwarnings jobs: - check: - name: Check + check-msrv: + name: Check MSRV runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - rust: - - stable - - 1.77.1 steps: - name: Checkout sources uses: actions/checkout@v3 - name: Install toolchain - uses: dtolnay/rust-toolchain@master - with: - toolchain: ${{ matrix.rust }} + uses: dtolnay/rust-toolchain@1.64.0 - name: Run cargo check run: cargo check diff --git a/.github/workflows/loom.yml b/.github/workflows/loom.yml index 1f88b1b..3cd8f2b 100644 --- a/.github/workflows/loom.yml +++ b/.github/workflows/loom.yml @@ -1,7 +1,9 @@ name: Loom on: - workflow_dispatch: + pull_request: + push: + branches: [ main ] jobs: loom: diff --git a/CHANGELOG.md b/CHANGELOG.md index ee080aa..7b0e92f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +# [Unreleased] +* Add `unexpected_cfgs` flag in `Cargo.toml` and accordingly decrease MSRV to + 1.64 (???). + # 0.2.0 (2024-05-15) * Make it possible to specify a deadline when waiting for an event ([#1]). diff --git a/Cargo.toml b/Cargo.toml index 7fc0d85..cd8277c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -8,7 +8,7 @@ name = "async-event" version = "0.2.0" authors = ["Serge Barral "] edition = "2021" -rust-version = "1.77" +rust-version = "1.64" license = "MIT OR Apache-2.0" repository = "https://github.com/asynchronics/async-event" readme = "README.md" @@ -22,11 +22,14 @@ keywords = ["async", "event", "atomic", "futures"] pin-project-lite = "0.2" [dev-dependencies] -tokio = { version = "1", features = ["full"] } +tokio = { version = "1.0", features = ["full"] } futures-executor = "0.3" [target.'cfg(async_event_loom)'.dependencies] loom = "0.5" [target.'cfg(async_event_loom)'.dev-dependencies] -waker-fn = "1.1" \ No newline at end of file +waker-fn = "1.1" + +[lints.rust] +unexpected_cfgs = { level = "warn", check-cfg = ['cfg(async_event_loom)'] } diff --git a/src/lib.rs b/src/lib.rs index 695e8e8..6b1d2a5 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -68,13 +68,6 @@ //! assert_eq!(v, 42); //! }); //! ``` - -// Temporary workaround until the `async_event_loom` flag can be whitelisted -// without a `build.rs` [1]. -// -// [1]: (https://github.com/rust-lang/rust/issues/124800). -#![allow(unexpected_cfgs)] - mod loom_exports; use std::future::Future; @@ -1141,6 +1134,7 @@ mod tests { /// When the future is still in a `Polled` state, this future is moved into /// the enum so as to extend its lifetime and allow it to be further /// notified. + #[allow(dead_code)] enum FutureState { Completed, Polled(Pin>), @@ -1371,7 +1365,7 @@ mod tests { loom_notify(2, 2, 1, 1, 1, true, DEFAULT_PREEMPTION_BOUND); } #[test] - fn loom_two_consumers_three_AVAILABLE_TOKENS() { + fn loom_two_consumers_three_tokens() { const DEFAULT_PREEMPTION_BOUND: usize = 3; loom_notify(3, 2, 1, 0, 0, false, DEFAULT_PREEMPTION_BOUND); }