1 error[E0308]: mismatched types
2 --> $DIR/suggest-missing-await.rs:12:14
5 | ^ expected `u32`, found opaque type
7 note: while checking the return type of the `async fn`
8 --> $DIR/suggest-missing-await.rs:5:24
10 LL | async fn make_u32() -> u32 {
11 | ^^^ checked the `Output` of this `async fn`, found opaque type
12 = note: expected type `u32`
13 found opaque type `impl Future<Output = u32>`
14 help: consider `await`ing on the `Future`
16 LL | take_u32(x.await)
19 error[E0308]: mismatched types
20 --> $DIR/suggest-missing-await.rs:22:5
23 | ^^^^^^^ expected `()`, found opaque type
25 note: while checking the return type of the `async fn`
26 --> $DIR/suggest-missing-await.rs:18:18
28 LL | async fn dummy() {}
29 | ^ checked the `Output` of this `async fn`, found opaque type
30 = note: expected unit type `()`
31 found opaque type `impl Future<Output = ()>`
32 help: consider `await`ing on the `Future`
36 help: consider using a semicolon here
41 error[E0308]: `if` and `else` have incompatible types
42 --> $DIR/suggest-missing-await.rs:35:9
44 LL | let _x = if true {
47 | | ------- expected because of this
51 | | ^^^^^^^^^^^^^ expected opaque type, found `()`
54 | |_____- `if` and `else` have incompatible types
56 = note: expected type `impl Future<Output = ()>`
58 help: consider `await`ing on the `Future`
63 error[E0308]: `match` arms have incompatible types
64 --> $DIR/suggest-missing-await.rs:45:14
66 LL | let _x = match 0usize {
69 | | ------- this is found to be of type `impl Future<Output = ()>`
71 | | ------- this is found to be of type `impl Future<Output = ()>`
72 LL | | 2 => dummy().await,
73 | | ^^^^^^^^^^^^^ expected opaque type, found `()`
76 | |_____- `match` arms have incompatible types
78 note: while checking the return type of the `async fn`
79 --> $DIR/suggest-missing-await.rs:18:18
81 LL | async fn dummy() {}
82 | ^ checked the `Output` of this `async fn`, expected opaque type
83 = note: expected opaque type `impl Future<Output = ()>`
85 help: consider `await`ing on the `Future`
87 LL ~ 0 => dummy().await,
88 LL ~ 1 => dummy().await,
91 error[E0308]: mismatched types
92 --> $DIR/suggest-missing-await.rs:53:9
95 | ^^ expected opaque type, found `()`
97 note: while checking the return type of the `async fn`
98 --> $DIR/suggest-missing-await.rs:18:18
100 LL | async fn dummy() {}
101 | ^ checked the `Output` of this `async fn`, expected opaque type
102 = note: expected opaque type `impl Future<Output = ()>`
104 help: consider `await`ing on the `Future`
106 LL | let _x = match dummy().await {
109 error[E0308]: mismatched types
110 --> $DIR/suggest-missing-await.rs:67:9
113 | ^^^^^ expected opaque type, found enum `Result`
115 note: while checking the return type of the `async fn`
116 --> $DIR/suggest-missing-await.rs:57:28
118 LL | async fn dummy_result() -> Result<(), ()> {
119 | ^^^^^^^^^^^^^^ checked the `Output` of this `async fn`, expected opaque type
120 = note: expected opaque type `impl Future<Output = Result<(), ()>>`
121 found enum `Result<_, _>`
122 help: consider `await`ing on the `Future`
124 LL | match dummy_result().await {
127 error[E0308]: mismatched types
128 --> $DIR/suggest-missing-await.rs:69:9
131 | ^^^^^^ expected opaque type, found enum `Result`
133 note: while checking the return type of the `async fn`
134 --> $DIR/suggest-missing-await.rs:57:28
136 LL | async fn dummy_result() -> Result<(), ()> {
137 | ^^^^^^^^^^^^^^ checked the `Output` of this `async fn`, expected opaque type
138 = note: expected opaque type `impl Future<Output = Result<(), ()>>`
139 found enum `Result<_, _>`
140 help: consider `await`ing on the `Future`
142 LL | match dummy_result().await {
145 error: aborting due to 7 previous errors
147 For more information about this error, try `rustc --explain E0308`.