about summary refs log tree commit diff
path: root/compiler/rustc_codegen_gcc
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2021-12-15 01:28:04 +0100
committerGitHub <noreply@github.com>2021-12-15 01:28:04 +0100
commit272188eecd59e122d2ad435256c0f65a0f63ccbf (patch)
treec1f7c6eb8711727fb3b43d592f5abf1a8abf3948 /compiler/rustc_codegen_gcc
parent2f4da6243f817b26c5c8156408911a01b39f9759 (diff)
parentf2fc84f60456d2acc480ca3b5616e5e9612575ec (diff)
downloadrust-272188eecd59e122d2ad435256c0f65a0f63ccbf.tar.gz
rust-272188eecd59e122d2ad435256c0f65a0f63ccbf.zip
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.
Diffstat (limited to 'compiler/rustc_codegen_gcc')
0 files changed, 0 insertions, 0 deletions