Closed
Description
This error confused me when trying to convert async/await code to latest nightly:
This function:
#![feature(async_await)]
async fn produces_error() {
r#await!(1);
}
produces the following diagnostic:
error[E0658]: macro r#await! is unstable
--> src/lib.rs:4:5
|
4 | r#await!(1);
| ^^^^^^^^^^^^
|
= note: for more information, see https://github.com/rust-lang/rust/issues/50547
= help: add #![feature(await_macro)] to the crate attributes to enable
error[E0727]: `async` generators are not yet supported
--> src/lib.rs:3:27
|
3 | async fn produces_error() {
| ___________________________^
4 | | r#await!(1);
5 | | }
| |_^
error: aborting due to 2 previous errors
I was mostly confused what it had to do with async generators, since there is no generator involved. Tracking it back to the old await!
wasn't obvious, since for my case that one was hidden in the "old" version of futures-rs select!
macro. Thereby using select!
lead to an error message which was hard to understand.
I guess this will go away once the old await macro is removed.
Metadata
Metadata
Assignees
Labels
No labels