You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
407: async: switch to async-fn-in-traits, release v0.2.0-alpha.0 r=eldruin a=Dirbaio
Latest Rust nightlies have somewhat usable async-fn-in-trait support already! 🎉
embassy-nrf updated here embassy-rs/embassy#974
Paprecuts encountered:
- there's this annoying error [playground](https://play.rust-lang.org/?version=nightly&mode=debug&edition=2021&gist=f04fca1f2a3d643c323fb49c05bd3ed3), workaround is to use the concrete type instead of `Self::Error`. This is a limitation of all `async fn`s, not just in traits, but it hits especially hard within traits, so I dunno if there's plans to improve it.
> `async fn` return type cannot contain a projection or `Self` that references lifetimes from a parent scope
- The SpiDevice trait ICEs, issue filed rust-lang/rust#102310
- default methods don't work, but there's a PR already rust-lang/rust#102308
Due to the last 2 I've left `SpiDevice` alone for now.
Co-authored-by: Dario Nieuwenhuis <[email protected]>
playground
fails with
Nightly version: 1.66.0-nightly (2022-09-25 f5193a9)
@rustbot label +F-async_fn_in_traits
The text was updated successfully, but these errors were encountered: