File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 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.
20882088Erroneous code example:
20892089
20902090```edition2018,compile-fail,E0698
2091- #![feature(futures_api, async_await, await_macro )]
2091+ #![feature(async_await)]
20922092async fn bar<T>() -> () {}
20932093
20942094async fn foo() {
2095- await!( bar()); // error: cannot infer type for `T`
2095+ bar().await; // error: cannot infer type for `T`
20962096}
20972097```
20982098
@@ -2101,12 +2101,12 @@ To fix this you must bind `T` to a concrete type such as `String`
21012101so that a generator can then be constructed:
21022102
21032103```edition2018
2104- #![feature(futures_api, async_await, await_macro )]
2104+ #![feature(async_await)]
21052105async fn bar<T>() -> () {}
21062106
21072107async fn foo() {
2108- await!( bar::<String>()) ;
2109- // ^^^^^^^^ specify type explicitly
2108+ bar::<String>().await ;
2109+ // ^^^^^^^^ specify type explicitly
21102110}
21112111```
21122112"## ,
You can’t perform that action at this time.
0 commit comments