-Recursion in an `async fn` requires boxing. For example, this will not compile:
+An [`async`] function used recursion without boxing.
+
+Erroneous code example:
```edition2018,compile_fail,E0733
async fn foo(n: usize) {
}
```
-To achieve async recursion, the `async fn` needs to be desugared
-such that the `Future` is explicit in the return type:
+To perform async recursion, the `async fn` needs to be desugared such that the
+`Future` is explicit in the return type:
```edition2018,compile_fail,E0720
use std::future::Future;
}
```
-The `Box<...>` ensures that the result is of known size,
-and the pin is required to keep it in the same place in memory.
+The `Box<...>` ensures that the result is of known size, and the pin is
+required to keep it in the same place in memory.
+
+[`async`]: https://doc.rust-lang.org/std/keyword.async.html