File tree 1 file changed +5
-5
lines changed
1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -2088,11 +2088,11 @@ generator can be constructed.
2088
2088
Erroneous code example:
2089
2089
2090
2090
```edition2018,compile-fail,E0698
2091
- #![feature(futures_api, async_await, await_macro )]
2091
+ #![feature(async_await)]
2092
2092
async fn bar<T>() -> () {}
2093
2093
2094
2094
async fn foo() {
2095
- await!( bar()); // error: cannot infer type for `T`
2095
+ bar().await; // error: cannot infer type for `T`
2096
2096
}
2097
2097
```
2098
2098
@@ -2101,12 +2101,12 @@ To fix this you must bind `T` to a concrete type such as `String`
2101
2101
so that a generator can then be constructed:
2102
2102
2103
2103
```edition2018
2104
- #![feature(futures_api, async_await, await_macro )]
2104
+ #![feature(async_await)]
2105
2105
async fn bar<T>() -> () {}
2106
2106
2107
2107
async fn foo() {
2108
- await!( bar::<String>()) ;
2109
- // ^^^^^^^^ specify type explicitly
2108
+ bar::<String>().await ;
2109
+ // ^^^^^^^^ specify type explicitly
2110
2110
}
2111
2111
```
2112
2112
"## ,
You can’t perform that action at this time.
0 commit comments