]> git.lizzy.rs Git - rust.git/commit
Rollup merge of #63796 - estebank:opaque_future, r=Centril
authorMazdak Farrokhzad <twingoow@gmail.com>
Thu, 22 Aug 2019 13:15:43 +0000 (15:15 +0200)
committerGitHub <noreply@github.com>
Thu, 22 Aug 2019 13:15:43 +0000 (15:15 +0200)
commitaa9490bd7b646f7b62cf831c462cde45598b468f
tree5e8d148b8ec66e1106b078ec72df0f042ee3ad0c
parent6c1cdb75ab12a487daee1564beb93e7fd95eff10
parenta710c610b2ea1550014e9f6bd20e5e4aed8a716c
Rollup merge of #63796 - estebank:opaque_future, r=Centril

Tweak E0308 on opaque types

```
error[E0308]: if and else have incompatible types
  --> file.rs:21:9
   |
18 | /     if true {
19 | |         thing_one()
   | |         ----------- expected because of this
20 | |     } else {
21 | |         thing_two()
   | |         ^^^^^^^^^^^ expected opaque type, found a different opaque type
22 | |     }.await
   | |_____- if and else have incompatible types
   |
   = note: expected type `impl std::future::Future` (opaque type)
              found type `impl std::future::Future` (opaque type)
   = note: distinct uses of `impl Trait` result in different opaque types
   = help: if both futures resolve to the same type, consider `await`ing on both of them
```

r? @Centril
CC #63167