3 // async_fn_in_trait is not enough to allow use of RPITIT
4 #![allow(incomplete_features)]
5 #![feature(async_fn_in_trait)]
8 fn bar() -> impl Sized; //~ ERROR `impl Trait` only allowed in function and inherent method return types, not in trait method return
9 fn baz() -> Box<impl std::fmt::Display>; //~ ERROR `impl Trait` only allowed in function and inherent method return types, not in trait method return
12 // Both return_position_impl_trait_in_trait and async_fn_in_trait are required for this (see also
13 // feature-gate-async_fn_in_trait.rs)
15 async fn bar() -> impl Sized; //~ ERROR `impl Trait` only allowed in function and inherent method return types, not in trait method return