@@ -80,7 +80,7 @@ blocking code except for async/await keywords. And use feature gate
8080 maybe_async = { version = " 0.2" , features = [" is_sync" ] }
8181 ```
8282
83- There are three usage variants for `maybe_async` attribute macros :
83+ There are three usage variants for `maybe_async` attribute usage :
8484 - `#[maybe_async]` or `#[maybe_async(Send)]`
8585
8686 In this mode, `#[async_trait::async_trait]` is added to trait declarations and trait implementations
@@ -97,11 +97,14 @@ blocking code except for async/await keywords. And use feature gate
9797
9898 AFIT is acronym for **a**sync **f**unction **i**n **t**rait, stabilized from rust 1.74
9999
100+ For compatibility reasons, the `async fn` in traits is supported via a verbose `AFIT` flag. This will become
101+ the default mode for the next major release.
102+
100103- `must_be_async`
101104
102105 **Keep async**.
103106
104- There are three usage variants for `must_be_async` attribute macros :
107+ There are three usage variants for `must_be_async` attribute usage :
105108 - `#[must_be_async]` or `#[must_be_async(Send)]`
106109 - `#[must_be_async(?Send)]`
107110 - `#[must_be_async(AFIT)]`
@@ -130,7 +133,7 @@ blocking code except for async/await keywords. And use feature gate
130133 An async implementation should on compile on async implementation and
131134 must simply disappear when we want sync version.
132135
133- There are three usage variants for `async_impl` attribute macros :
136+ There are three usage variants for `async_impl` attribute usage :
134137 - `#[async_impl]` or `#[async_impl(Send)]`
135138 - `#[async_impl(?Send)]`
136139 - `#[async_impl(AFIT)]`
@@ -179,7 +182,7 @@ Here is a detailed example on what's going on whe the `is_sync` feature
179182gate set or not.
180183
181184```rust
182- # [maybe_async::maybe_async(?Send )]
185+ # [maybe_async::maybe_async(AFIT )]
183186trait A {
184187 async fn async_fn_name() -> Result<(), ()> {
185188 Ok(())
@@ -191,7 +194,7 @@ trait A {
191194
192195struct Foo;
193196
194- # [maybe_async::maybe_async(?Send )]
197+ # [maybe_async::maybe_async(AFIT )]
195198impl A for Foo {
196199 async fn async_fn_name() -> Result<(), ()> {
197200 Ok(())
@@ -215,7 +218,6 @@ is async code:
215218
216219``` rust
217220// Compiled code when `is_sync` is toggled off.
218- #[async_trait:: async_trait(? Send )]
219221trait A {
220222 async fn maybe_async_fn_name () -> Result <(), ()> {
221223 Ok (())
@@ -227,7 +229,6 @@ trait A {
227229
228230struct Foo ;
229231
230- #[async_trait:: async_trait(? Send )]
231232impl A for Foo {
232233 async fn maybe_async_fn_name () -> Result <(), ()> {
233234 Ok (())
0 commit comments