1 error[E0308]: `if` and `else` have incompatible types
2 --> $DIR/if-then-neeing-semi.rs:37:9
8 | | -------------- expected because of this
12 | | ^^^^^^^^^^^^^ expected `()`, found opaque type
16 | |_____- `if` and `else` have incompatible types
18 note: while checking the return type of the `async fn`
19 --> $DIR/if-then-neeing-semi.rs:18:24
21 LL | async fn async_dummy() {}
22 | ^ checked the `Output` of this `async fn`, found opaque type
23 = note: expected unit type `()`
24 found opaque type `impl Future<Output = ()>`
25 help: consider `await`ing on the `Future`
27 LL | async_dummy().await
29 help: consider removing this semicolon
35 error[E0308]: `if` and `else` have incompatible types
36 --> $DIR/if-then-neeing-semi.rs:50:9
38 LL | let _ = if true {
42 | | -------------- expected because of this
46 | | ^^^^^^^^^^^^^^ expected `()`, found opaque type
50 | |_____- `if` and `else` have incompatible types
52 note: while checking the return type of the `async fn`
53 --> $DIR/if-then-neeing-semi.rs:24:25
55 LL | async fn async_dummy2() {}
56 | ^ checked the `Output` of this `async fn`, found opaque type
57 = note: expected unit type `()`
58 found opaque type `impl Future<Output = ()>`
59 help: consider `await`ing on the `Future`
61 LL | async_dummy2().await
63 help: consider removing this semicolon and boxing the expressions
65 LL ~ Box::new(async_dummy())
68 LL ~ Box::new(async_dummy2())
71 error[E0308]: `if` and `else` have incompatible types
72 --> $DIR/if-then-neeing-semi.rs:63:9
74 LL | let _ = if true {
78 | | ------------- expected because of this
82 | | ^^^^^^^^^^^^^^ expected opaque type, found a different opaque type
86 | |_____- `if` and `else` have incompatible types
88 note: while checking the return type of the `async fn`
89 --> $DIR/if-then-neeing-semi.rs:18:24
91 LL | async fn async_dummy() {}
92 | ^ checked the `Output` of this `async fn`, expected opaque type
93 note: while checking the return type of the `async fn`
94 --> $DIR/if-then-neeing-semi.rs:24:25
96 LL | async fn async_dummy2() {}
97 | ^ checked the `Output` of this `async fn`, found opaque type
98 = note: expected opaque type `impl Future<Output = ()>` (opaque type at <$DIR/if-then-neeing-semi.rs:18:24>)
99 found opaque type `impl Future<Output = ()>` (opaque type at <$DIR/if-then-neeing-semi.rs:24:25>)
100 = note: distinct uses of `impl Trait` result in different opaque types
101 help: consider `await`ing on both `Future`s
103 LL ~ async_dummy().await
106 LL ~ async_dummy2().await
109 error[E0308]: `if` and `else` have incompatible types
110 --> $DIR/if-then-neeing-semi.rs:13:9
112 LL | let _ = if true {
118 | | | help: consider removing this semicolon
119 | | expected because of this
123 | | ^^^^^^^ expected `()`, found `i32`
126 | |_____- `if` and `else` have incompatible types
128 error: aborting due to 4 previous errors
130 For more information about this error, try `rustc --explain E0308`.