3 // RPITIT is not enough to allow use of async functions
4 #![allow(incomplete_features)]
5 #![feature(return_position_impl_trait_in_trait)]
8 async fn foo(); //~ ERROR functions in traits cannot be declared `async`
11 // Both return_position_impl_trait_in_trait and async_fn_in_trait are required for this (see also
12 // feature-gate-return_position_impl_trait_in_trait.rs)
14 async fn foo() -> impl Sized; //~ ERROR functions in traits cannot be declared `async`
18 fn foo() -> impl std::future::Future<Output = ()>;
22 async fn foo() {} //~ ERROR functions in traits cannot be declared `async`