about summary refs log tree commit diff
path: root/compiler/rustc_llvm/llvm-wrapper/CoverageMappingWrapper.cpp
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume1.gomez@gmail.com>2021-02-26 15:52:30 +0100
committerGitHub <noreply@github.com>2021-02-26 15:52:30 +0100
commita56bbb134fe98931de92b587c3b98920f6923bc9 (patch)
treea2bc152e1b767eb070df6d77fdd690d633b59ea1 /compiler/rustc_llvm/llvm-wrapper/CoverageMappingWrapper.cpp
parent0db8349fff644b0073f3560085c6266e9871bebd (diff)
parent356beb3084e2a76283a19218d7cef5954d7f79ae (diff)
downloadrust-a56bbb134fe98931de92b587c3b98920f6923bc9.tar.gz
rust-a56bbb134fe98931de92b587c3b98920f6923bc9.zip
Rollup merge of #82165 - nellshamrell:nell/fix-80658-B, r=estebank
Reword labels on E0308 involving async fn return type

Fix for #80658.

When someone writes code like this:

```rust
fn foo() -> u8 {
    async fn async_fn() -> () {}

    async_fn()
}
```

And they try to compile it, they will see an error that looks like this:

```bash
error[E0308]: mismatched types
 --> test.rs:4:5
  |
1 | fn foo() -> u8 {
  |             -- expected `u8` because of return type
2 |     async fn async_fn() -> () {}
  |                            -- checked the `Output` of this `async fn`, found opaque type
3 |
4 |     async_fn()
  |     ^^^^^^^^^^ expected `u8`, found opaque type
  |
  = note: while checking the return type of this `async fn`
  = note:     expected type `u8`
          found opaque type `impl Future`
```
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/CoverageMappingWrapper.cpp')
0 files changed, 0 insertions, 0 deletions