about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src
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
commitb166642c353ea19c02c4bdb7494c1c2f19868ad4 (patch)
treeba3317f58cb5b376c1ee142f8ed0c7cf390cf5dd /compiler/rustc_codegen_llvm/src
parent6b6cc5d5764e83a122f24d966a59a60cee871633 (diff)
parentc5287b37fa048e83374afa274168f184a4479013 (diff)
downloadrust-b166642c353ea19c02c4bdb7494c1c2f19868ad4.tar.gz
rust-b166642c353ea19c02c4bdb7494c1c2f19868ad4.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_llvm/src')
0 files changed, 0 insertions, 0 deletions