diff --git a/compiler/rustc_hir_typeck/src/method/suggest.rs b/compiler/rustc_hir_typeck/src/method/suggest.rs index 331fb91becadd..8f70e70f2090c 100644 --- a/compiler/rustc_hir_typeck/src/method/suggest.rs +++ b/compiler/rustc_hir_typeck/src/method/suggest.rs @@ -3589,8 +3589,9 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> { "method `poll` found on `Pin<&mut {ty_str}>`, \ see documentation for `std::pin::Pin`" )); - err.help("self type must be pinned to call `Future::poll`, \ - see https://rust-lang.github.io/async-book/04_pinning/01_chapter.html#pinning-in-practice" + err.help( + "self type must be pinned to call `Future::poll`, \ + see https://rust-lang.github.io/async-book/part-reference/pinning.html", ); } diff --git a/tests/ui/async-await/issue-108572.stderr b/tests/ui/async-await/issue-108572.stderr index 6a80bc1491062..f8da064da9c4c 100644 --- a/tests/ui/async-await/issue-108572.stderr +++ b/tests/ui/async-await/issue-108572.stderr @@ -5,7 +5,7 @@ LL | fut.poll(cx); | ^^^^ method not found in `impl Future` | = help: method `poll` found on `Pin<&mut impl Future>`, see documentation for `std::pin::Pin` - = help: self type must be pinned to call `Future::poll`, see https://rust-lang.github.io/async-book/04_pinning/01_chapter.html#pinning-in-practice + = help: self type must be pinned to call `Future::poll`, see https://rust-lang.github.io/async-book/part-reference/pinning.html help: consider pinning the expression | LL ~ let mut pinned = std::pin::pin!(fut);