diff options
| author | 许杰友 Jieyou Xu (Joe) <39484203+jieyouxu@users.noreply.github.com> | 2024-06-11 21:27:46 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-06-11 21:27:46 +0100 |
| commit | 260f789ae19c10a57d86437fda00989e9dbfecd9 (patch) | |
| tree | 39166f2bf00f3771cd2c17f8b9cdb52dda1809dc /compiler/rustc_query_impl/src | |
| parent | 91374faffb54af18d534754a0a69c99fe991c057 (diff) | |
| parent | 5585f3133c05a33e59cd352a32fdf171447a9b2b (diff) | |
| download | rust-260f789ae19c10a57d86437fda00989e9dbfecd9.tar.gz rust-260f789ae19c10a57d86437fda00989e9dbfecd9.zip | |
Rollup merge of #125684 - estebank:pin-to-binding-suggestion, r=pnkfelix
Account for existing bindings when suggesting `pin!()` When we encounter a situation where we'd suggest `pin!()`, we now account for that expression existing as part of an assignment and provide an appropriate suggestion: ``` error[E0599]: no method named `poll` found for type parameter `F` in the current scope --> $DIR/pin-needed-to-poll-3.rs:19:28 | LL | impl<F> Future for FutureWrapper<F> | - method `poll` not found for this type parameter ... LL | let res = self.fut.poll(cx); | ^^^^ method not found in `F` | help: consider pinning the expression | LL ~ let mut pinned = std::pin::pin!(self.fut); LL ~ let res = pinned.as_mut().poll(cx); | ``` Fix #125661.
Diffstat (limited to 'compiler/rustc_query_impl/src')
0 files changed, 0 insertions, 0 deletions
