11error[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
33 |
44LL | async fn async_dummy() {}
55 | - the `Output` of this `async fn`'s found opaque type
@@ -30,7 +30,7 @@ LL | false => async_dummy().await,
3030 | ^^^^^^
3131
3232error[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
3434 |
3535LL | async fn async_dummy2() {}
3636 | - the `Output` of this `async fn`'s found opaque type
@@ -60,6 +60,28 @@ help: consider `await`ing on the `Future`
6060LL | false => async_dummy2().await,
6161 | ^^^^^^
6262
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+
6385error[E0308]: `match` arms have incompatible types
6486 --> $DIR/match-prev-arm-needing-semi.rs:11:18
6587 |
@@ -79,6 +101,6 @@ LL | |
79101LL | | };
80102 | |_____- `match` arms have incompatible types
81103
82- error: aborting due to 3 previous errors
104+ error: aborting due to 4 previous errors
83105
84106For more information about this error, try `rustc --explain E0308`.
0 commit comments