about summary refs log tree commit diff
path: root/compiler/rustc_interface/src/errors.rs
diff options
context:
space:
mode:
authorEsteban Küber <esteban@kuber.com.ar>2024-05-28 20:05:01 +0000
committerEsteban Küber <esteban@kuber.com.ar>2024-05-28 20:05:01 +0000
commit1a840e7732536bbf5c4d2f434d4af138983f4b0a (patch)
tree4c1a29f1b44a920022a075e732778b97062b4542 /compiler/rustc_interface/src/errors.rs
parent8c4db851a7bb64173832e6602638204ebbd373a8 (diff)
downloadrust-1a840e7732536bbf5c4d2f434d4af138983f4b0a.tar.gz
rust-1a840e7732536bbf5c4d2f434d4af138983f4b0a.zip
Add test for incorrect pinning suggestion
The following suggestion is incorrect, as it doesn't account for the binding:

```
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 res = let mut pinned = std::pin::pin!(self.fut);
LL ~         pinned.as_mut().poll(cx);
   |
```
Diffstat (limited to 'compiler/rustc_interface/src/errors.rs')
0 files changed, 0 insertions, 0 deletions