From 739fa02ebe38e9cb29f0c3c9c05ad93dde49c57d Mon Sep 17 00:00:00 2001 From: rmsyn Date: Sun, 15 Oct 2023 23:11:22 +0000 Subject: [PATCH 1/2] async: disable `Send` lint in async traits Adds `#[allow(async_fn_in_trait)]` to disable the lint in `async` trait functions recommending `Send` in the return type. Adding the type annotation is currently unstable, has little-to-no utility in current crates using `embedded-hal`, and will break those users. See for details and discussion. --- embedded-hal-async/src/lib.rs | 2 ++ embedded-io-async/src/lib.rs | 2 ++ 2 files changed, 4 insertions(+) diff --git a/embedded-hal-async/src/lib.rs b/embedded-hal-async/src/lib.rs index e724207b7..cc3060708 100644 --- a/embedded-hal-async/src/lib.rs +++ b/embedded-hal-async/src/lib.rs @@ -6,6 +6,8 @@ // We don't immediately remove them to not immediately break older nightlies. // When all features are stable, we'll remove them. #![allow(stable_features)] +#![allow(unknown_lints)] +#![allow(async_fn_in_trait)] #![feature(async_fn_in_trait, impl_trait_projections)] pub mod delay; diff --git a/embedded-io-async/src/lib.rs b/embedded-io-async/src/lib.rs index a726147d9..2970aa82f 100644 --- a/embedded-io-async/src/lib.rs +++ b/embedded-io-async/src/lib.rs @@ -7,6 +7,8 @@ // We don't immediately remove them to not immediately break older nightlies. // When all features are stable, we'll remove them. #![allow(stable_features)] +#![allow(unknown_lints)] +#![allow(async_fn_in_trait)] #![feature(async_fn_in_trait, impl_trait_projections)] #[cfg(feature = "alloc")] From fb30c9b7475610379c807b3d5e6083ced652c35e Mon Sep 17 00:00:00 2001 From: rmsyn Date: Sun, 15 Oct 2023 23:42:37 +0000 Subject: [PATCH 2/2] ci: update nightly versions for clippy and rustdoc --- .github/workflows/clippy.yml | 4 ++-- .github/workflows/rustdoc.yml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/clippy.yml b/.github/workflows/clippy.yml index 1479e4a56..dcea25c5e 100644 --- a/.github/workflows/clippy.yml +++ b/.github/workflows/clippy.yml @@ -15,6 +15,6 @@ jobs: with: # embedded-hal-async needs nightly. # Use a pinned version to avoid spontaneous breakages (new clippy lints are added often) - toolchain: nightly-2023-07-03 + toolchain: nightly-2023-10-14 components: clippy - - run: cargo clippy --all-features -- --deny=warnings \ No newline at end of file + - run: cargo clippy --all-features -- --deny=warnings diff --git a/.github/workflows/rustdoc.yml b/.github/workflows/rustdoc.yml index e0202bac8..cef117665 100644 --- a/.github/workflows/rustdoc.yml +++ b/.github/workflows/rustdoc.yml @@ -13,5 +13,5 @@ jobs: - uses: actions/checkout@v3 - uses: dtolnay/rust-toolchain@master with: - toolchain: nightly-2023-07-03 - - run: RUSTDOCFLAGS="--deny=warnings --cfg=docsrs" cargo doc --all-features \ No newline at end of file + toolchain: nightly-2023-10-14 + - run: RUSTDOCFLAGS="--deny=warnings --cfg=docsrs" cargo doc --all-features