1 use maybe_async::maybe_async; 2 3 #[maybe_async] async_fn() -> bool4async fn async_fn() -> bool { 5 true 6 } 7 8 // should only accept `async` 9 #[maybe_async::test(feature="is_sync", unknown(not(feature="is_sync"), async_std::test))] test_async_fn()10async fn test_async_fn() { 11 let res = async_fn().await; 12 assert_eq!(res, true); 13 } 14 main()15fn main() { 16 17 } 18