File tree 1 file changed +6
-3
lines changed
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;
2127
2127
"## ,
2128
2128
2129
2129
E0728 : r##"
2130
- `await` has been used outside `async` function or block.
2130
+ [ `await`] has been used outside [ `async`] function or block.
2131
2131
2132
2132
Erroneous code examples:
2133
2133
@@ -2160,9 +2160,9 @@ fn foo() {
2160
2160
}
2161
2161
```
2162
2162
2163
- `await` is used to suspend the current computation until the given
2163
+ [ `await`] is used to suspend the current computation until the given
2164
2164
future 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.
2166
2166
2167
2167
```edition2018
2168
2168
# use std::pin::Pin;
@@ -2199,6 +2199,9 @@ fn bar(x: u8) -> impl Future<Output = u8> {
2199
2199
}
2200
2200
}
2201
2201
```
2202
+
2203
+ [`async`]: https://doc.rust-lang.org/std/keyword.async.html
2204
+ [`await`]: https://doc.rust-lang.org/std/keyword.await.html
2202
2205
"## ,
2203
2206
2204
2207
E0734 : r##"
You can’t perform that action at this time.
0 commit comments