Skip to content

Commit 739fa02

Browse files
committed
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 <#515 (comment)> for details and discussion.
1 parent 8e66252 commit 739fa02

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

embedded-hal-async/src/lib.rs

+2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
// We don't immediately remove them to not immediately break older nightlies.
77
// When all features are stable, we'll remove them.
88
#![allow(stable_features)]
9+
#![allow(unknown_lints)]
10+
#![allow(async_fn_in_trait)]
911
#![feature(async_fn_in_trait, impl_trait_projections)]
1012

1113
pub mod delay;

embedded-io-async/src/lib.rs

+2
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
// We don't immediately remove them to not immediately break older nightlies.
88
// When all features are stable, we'll remove them.
99
#![allow(stable_features)]
10+
#![allow(unknown_lints)]
11+
#![allow(async_fn_in_trait)]
1012
#![feature(async_fn_in_trait, impl_trait_projections)]
1113

1214
#[cfg(feature = "alloc")]

0 commit comments

Comments
 (0)