Skip to content

Commit 5d3f80a

Browse files
authored
Rollup merge of #150562 - Trivaxy:poll-doc-patch, r=apiraino
Fix doc link used in suggestion for pinning self Fixes #147901 The old suggestion linked to a documentation page that [no longer exists](https://rust-lang.github.io/async-book/04_pinning/01_chapter.html#pinning-in-practice). Presumably, [this](https://rust-lang.github.io/async-book/part-reference/pinning.html) is the better place to link to now
2 parents 651db87 + 9014fda commit 5d3f80a

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

compiler/rustc_hir_typeck/src/method/suggest.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3776,8 +3776,9 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
37763776
"method `poll` found on `Pin<&mut {ty_str}>`, \
37773777
see documentation for `std::pin::Pin`"
37783778
));
3779-
err.help("self type must be pinned to call `Future::poll`, \
3780-
see https://rust-lang.github.io/async-book/04_pinning/01_chapter.html#pinning-in-practice"
3779+
err.help(
3780+
"self type must be pinned to call `Future::poll`, \
3781+
see https://rust-lang.github.io/async-book/part-reference/pinning.html",
37813782
);
37823783
}
37833784

tests/ui/async-await/issue-108572.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ LL | fut.poll(cx);
55
| ^^^^ method not found in `impl Future<Output = ()>`
66
|
77
= help: method `poll` found on `Pin<&mut impl Future<Output = ()>>`, see documentation for `std::pin::Pin`
8-
= 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
8+
= help: self type must be pinned to call `Future::poll`, see https://rust-lang.github.io/async-book/part-reference/pinning.html
99
help: consider pinning the expression
1010
|
1111
LL ~ let mut pinned = std::pin::pin!(fut);

0 commit comments

Comments
 (0)