File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -2127,7 +2127,7 @@ static X: u32 = 42;
21272127"## ,
21282128
21292129E0728 : r##"
2130- `await` has been used outside `async` function or block.
2130+ [ `await`] has been used outside [ `async`] function or block.
21312131
21322132Erroneous code examples:
21332133
@@ -2160,9 +2160,9 @@ fn foo() {
21602160}
21612161```
21622162
2163- `await` is used to suspend the current computation until the given
2163+ [ `await`] is used to suspend the current computation until the given
21642164future is ready to produce a value. So it is legal only within
2165- an async context, like an `async fn` or an `async` block.
2165+ an [` async`] context, like an `async fn` or an `async` block.
21662166
21672167```edition2018
21682168# use std::pin::Pin;
@@ -2199,6 +2199,9 @@ fn bar(x: u8) -> impl Future<Output = u8> {
21992199 }
22002200}
22012201```
2202+
2203+ [`async`]: https://doc.rust-lang.org/std/keyword.async.html
2204+ [`await`]: https://doc.rust-lang.org/std/keyword.await.html
22022205"## ,
22032206
22042207E0734 : r##"
You can’t perform that action at this time.
0 commit comments