]> git.proxmox.com Git - rustc.git/blame - src/test/ui/suggestions/opaque-type-error.stderr
New upstream version 1.48.0~beta.8+dfsg1
[rustc.git] / src / test / ui / suggestions / opaque-type-error.stderr
CommitLineData
dfeec247 1error[E0308]: `if` and `else` have incompatible types
e1599b0c
XL
2 --> $DIR/opaque-type-error.rs:20:9
3 |
dfeec247
XL
4LL | fn thing_two() -> impl Future<Output = Result<(), ()>> {
5 | ------------------------------------ the found opaque type
6...
e1599b0c
XL
7LL | / if true {
8LL | | thing_one()
9 | | ----------- expected because of this
10LL | | } else {
11LL | | thing_two()
12 | | ^^^^^^^^^^^ expected opaque type, found a different opaque type
13LL | | }.await
dfeec247 14 | |_____- `if` and `else` have incompatible types
e1599b0c 15 |
1b1a35ee
XL
16 = note: expected type `impl Future` (opaque type at <$DIR/opaque-type-error.rs:8:19>)
17 found opaque type `impl Future` (opaque type at <$DIR/opaque-type-error.rs:12:19>)
e1599b0c 18 = note: distinct uses of `impl Trait` result in different opaque types
e1599b0c
XL
19
20error: aborting due to previous error
21
22For more information about this error, try `rustc --explain E0308`.