about summary refs log tree commit diff
path: root/compiler/rustc_llvm/src/lib.rs
diff options
context:
space:
mode:
authorEsteban Küber <esteban@kuber.com.ar>2024-05-28 20:48:35 +0000
committerEsteban Küber <esteban@kuber.com.ar>2024-05-28 20:48:35 +0000
commit5585f3133c05a33e59cd352a32fdf171447a9b2b (patch)
treeed3a88cf132425ab21722dca316f55ecfb859d05 /compiler/rustc_llvm/src/lib.rs
parent1a840e7732536bbf5c4d2f434d4af138983f4b0a (diff)
downloadrust-5585f3133c05a33e59cd352a32fdf171447a9b2b.tar.gz
rust-5585f3133c05a33e59cd352a32fdf171447a9b2b.zip
Account for existing bindings when suggesting pinning
When we encounter a situation where we'd suggest `pin!()`, we now account for that expression exising 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_llvm/src/lib.rs')
0 files changed, 0 insertions, 0 deletions