1
1
error[E0308]: `match` arms have incompatible types
2
- --> $DIR/match-prev-arm-needing-semi.rs:25 :18
2
+ --> $DIR/match-prev-arm-needing-semi.rs:26 :18
3
3
|
4
4
LL | async fn async_dummy() {}
5
5
| - the `Output` of this `async fn`'s found opaque type
@@ -30,7 +30,7 @@ LL | false => async_dummy().await,
30
30
| ^^^^^^
31
31
32
32
error[E0308]: `match` arms have incompatible types
33
- --> $DIR/match-prev-arm-needing-semi.rs:38 :18
33
+ --> $DIR/match-prev-arm-needing-semi.rs:39 :18
34
34
|
35
35
LL | async fn async_dummy2() {}
36
36
| - the `Output` of this `async fn`'s found opaque type
@@ -60,6 +60,28 @@ help: consider `await`ing on the `Future`
60
60
LL | false => async_dummy2().await,
61
61
| ^^^^^^
62
62
63
+ error[E0308]: `match` arms have incompatible types
64
+ --> $DIR/match-prev-arm-needing-semi.rs:49:18
65
+ |
66
+ LL | async fn async_dummy2() {}
67
+ | - the `Output` of this `async fn`'s found opaque type
68
+ ...
69
+ LL | let _ = match true {
70
+ | _____________-
71
+ LL | | true => async_dummy(),
72
+ | | ------------- this is found to be of type `impl Future`
73
+ LL | | false => async_dummy2(),
74
+ | | ^^^^^^^^^^^^^^ expected opaque type, found a different opaque type
75
+ LL | |
76
+ LL | |
77
+ LL | |
78
+ LL | | };
79
+ | |_____- `match` arms have incompatible types
80
+ |
81
+ = note: expected type `impl Future` (opaque type at <$DIR/match-prev-arm-needing-semi.rs:16:24>)
82
+ found opaque type `impl Future` (opaque type at <$DIR/match-prev-arm-needing-semi.rs:17:25>)
83
+ = note: distinct uses of `impl Trait` result in different opaque types
84
+
63
85
error[E0308]: `match` arms have incompatible types
64
86
--> $DIR/match-prev-arm-needing-semi.rs:11:18
65
87
|
@@ -79,6 +101,6 @@ LL | |
79
101
LL | | };
80
102
| |_____- `match` arms have incompatible types
81
103
82
- error: aborting due to 3 previous errors
104
+ error: aborting due to 4 previous errors
83
105
84
106
For more information about this error, try `rustc --explain E0308`.
0 commit comments