Closed
Description
When compiling for the 2018 edition, rustc allows async fn
both outside of an impl and within an inherent impl.
When compiling for the 2015 edition, async fn
works outside of an impl, but putting one inside an inherent impl produces this error:
error: missing `fn`, `type`, or `const` for impl-item declaration
--> src/lib.rs:4:9
|
4 | impl A { async fn inside_impl() {} }
| ^ missing `fn`, `type`, or `const`
Either this should be allowed, or it should result in a better error message that recommends switching to the 2018 edition.