Files
rust/compiler
Matthias Krüger 272188eecd Rollup merge of #90939 - estebank:wg-af-polish, r=tmandry
Tweak errors coming from `for`-loop, `?` and `.await` desugaring

 * Suggest removal of `.await` on non-`Future` expression
 * Keep track of obligations introduced by desugaring
 * Remove span pointing at method for obligation errors coming from desugaring
 * Point at called local sync `fn` and suggest making it `async`

```
error[E0277]: `()` is not a future
  --> $DIR/unnecessary-await.rs:9:10
   |
LL |     boo().await;
   |     -----^^^^^^ `()` is not a future
   |     |
   |     this call returns `()`
   |
   = help: the trait `Future` is not implemented for `()`
help: do not `.await` the expression
   |
LL -     boo().await;
LL +     boo();
   |
help: alternatively, consider making `fn boo` asynchronous
   |
LL | async fn boo () {}
   | +++++
```

Fix #66731.
2021-12-15 01:28:04 +01:00
..
2021-09-20 22:21:42 -04:00
2021-11-19 07:52:59 +11:00
2021-11-30 13:08:41 -05:00
2021-12-09 00:01:29 +01:00
2021-09-20 22:21:42 -04:00
2021-12-09 00:01:29 +01:00
2021-12-12 12:35:00 +08:00
2021-12-13 17:09:16 +00:00
2021-09-20 22:21:42 -04:00
2021-12-12 12:35:00 +08:00
2021-12-09 00:01:29 +01:00