From 71f5d220ee9805235256708b9e3b7ff5398ce119 Mon Sep 17 00:00:00 2001 From: Philipp Oppermann Date: Thu, 8 Feb 2024 19:06:38 +0100 Subject: [PATCH] Fix links to Rust unstable book --- blog/content/edition-2/posts/12-async-await/index.ja.md | 4 ++-- blog/content/edition-2/posts/12-async-await/index.md | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/blog/content/edition-2/posts/12-async-await/index.ja.md b/blog/content/edition-2/posts/12-async-await/index.ja.md index b7c5f90f..94cf8910 100644 --- a/blog/content/edition-2/posts/12-async-await/index.ja.md +++ b/blog/content/edition-2/posts/12-async-await/index.ja.md @@ -469,9 +469,9 @@ ExampleStateMachine::End(_) => { Futureは `Poll::Ready` を返した後、再びポーリングされるべきではありません。したがって、すでに `End` の状態にあるときに `poll` が呼ばれるとパニックするようにしましょう。 -コンパイラが生成するステートマシンとその `Future` traitの実装はこのようになっている**かもしれません**。実際には、コンパイラは異なる方法でコードを生成しています。 (一応、現在は[_generators_]をベースにした実装になっていますが、これはあくまでも実装の詳細です。) +コンパイラが生成するステートマシンとその `Future` traitの実装はこのようになっている**かもしれません**。実際には、コンパイラは異なる方法でコードを生成しています。 (一応、現在は[_coroutines_]をベースにした実装になっていますが、これはあくまでも実装の詳細です。) -[_generators_]: https://doc.rust-lang.org/stable/unstable-book/language-features/generators.html +[_coroutines_]: https://doc.rust-lang.org/stable/unstable-book/language-features/coroutines.html パズルの最後のピースは、生成された `example` 関数自体のコードです。関数のヘッダは次のように定義されていたことを思い出してください: diff --git a/blog/content/edition-2/posts/12-async-await/index.md b/blog/content/edition-2/posts/12-async-await/index.md index 7d563050..69793acf 100644 --- a/blog/content/edition-2/posts/12-async-await/index.md +++ b/blog/content/edition-2/posts/12-async-await/index.md @@ -462,9 +462,9 @@ ExampleStateMachine::End(_) => { Futures should not be polled again after they returned `Poll::Ready`, so we panic if `poll` is called while we are already in the `End` state. -We now know what the compiler-generated state machine and its implementation of the `Future` trait _could_ look like. In practice, the compiler generates code in a different way. (In case you're interested, the implementation is currently based on [_generators_], but this is only an implementation detail.) +We now know what the compiler-generated state machine and its implementation of the `Future` trait _could_ look like. In practice, the compiler generates code in a different way. (In case you're interested, the implementation is currently based on [_coroutines_], but this is only an implementation detail.) -[_generators_]: https://doc.rust-lang.org/stable/unstable-book/language-features/generators.html +[_coroutines_]: https://doc.rust-lang.org/stable/unstable-book/language-features/coroutines.html The last piece of the puzzle is the generated code for the `example` function itself. Remember, the function header was defined like this: