1 error[E0308]: mismatched types
2 --> $DIR/suggest-missing-await.rs:12:14
5 | -------- ^ expected `u32`, found opaque type
7 | arguments to this function are incorrect
9 note: while checking the return type of the `async fn`
10 --> $DIR/suggest-missing-await.rs:5:24
12 LL | async fn make_u32() -> u32 {
13 | ^^^ checked the `Output` of this `async fn`, found opaque type
14 = note: expected type `u32`
15 found opaque type `impl Future<Output = u32>`
16 note: function defined here
17 --> $DIR/suggest-missing-await.rs:3:4
19 LL | fn take_u32(_x: u32) {}
21 help: consider `await`ing on the `Future`
23 LL | take_u32(x.await)
26 error[E0308]: mismatched types
27 --> $DIR/suggest-missing-await.rs:22:5
30 | ^^^^^^^ expected `()`, found opaque type
32 note: while checking the return type of the `async fn`
33 --> $DIR/suggest-missing-await.rs:18:18
35 LL | async fn dummy() {}
36 | ^ checked the `Output` of this `async fn`, found opaque type
37 = note: expected unit type `()`
38 found opaque type `impl Future<Output = ()>`
39 help: consider `await`ing on the `Future`
43 help: consider using a semicolon here
48 error[E0308]: `if` and `else` have incompatible types
49 --> $DIR/suggest-missing-await.rs:35:9
51 LL | let _x = if true {
54 | | ------- expected because of this
58 | | ^^^^^^^^^^^^^ expected opaque type, found `()`
61 | |_____- `if` and `else` have incompatible types
63 note: while checking the return type of the `async fn`
64 --> $DIR/suggest-missing-await.rs:18:18
66 LL | async fn dummy() {}
67 | ^ checked the `Output` of this `async fn`, expected opaque type
68 = note: expected opaque type `impl Future<Output = ()>`
70 help: consider `await`ing on the `Future`
75 error[E0308]: `match` arms have incompatible types
76 --> $DIR/suggest-missing-await.rs:45:14
78 LL | let _x = match 0usize {
81 | | ------- this is found to be of type `impl Future<Output = ()>`
83 | | ------- this is found to be of type `impl Future<Output = ()>`
84 LL | | 2 => dummy().await,
85 | | ^^^^^^^^^^^^^ expected opaque type, found `()`
88 | |_____- `match` arms have incompatible types
90 note: while checking the return type of the `async fn`
91 --> $DIR/suggest-missing-await.rs:18:18
93 LL | async fn dummy() {}
94 | ^ checked the `Output` of this `async fn`, expected opaque type
95 = note: expected opaque type `impl Future<Output = ()>`
97 help: consider `await`ing on the `Future`
99 LL ~ 0 => dummy().await,
100 LL ~ 1 => dummy().await,
103 error[E0308]: mismatched types
104 --> $DIR/suggest-missing-await.rs:53:9
106 LL | let _x = match dummy() {
107 | ------- this expression has type `impl Future<Output = ()>`
109 | ^^ expected opaque type, found `()`
111 note: while checking the return type of the `async fn`
112 --> $DIR/suggest-missing-await.rs:18:18
114 LL | async fn dummy() {}
115 | ^ checked the `Output` of this `async fn`, expected opaque type
116 = note: expected opaque type `impl Future<Output = ()>`
118 help: consider `await`ing on the `Future`
120 LL | let _x = match dummy().await {
123 error[E0308]: mismatched types
124 --> $DIR/suggest-missing-await.rs:67:9
126 LL | match dummy_result() {
127 | -------------- this expression has type `impl Future<Output = Result<(), ()>>`
130 | ^^^^^ expected opaque type, found enum `Result`
132 note: while checking the return type of the `async fn`
133 --> $DIR/suggest-missing-await.rs:57:28
135 LL | async fn dummy_result() -> Result<(), ()> {
136 | ^^^^^^^^^^^^^^ checked the `Output` of this `async fn`, expected opaque type
137 = note: expected opaque type `impl Future<Output = Result<(), ()>>`
138 found enum `Result<_, _>`
139 help: consider `await`ing on the `Future`
141 LL | match dummy_result().await {
144 error[E0308]: mismatched types
145 --> $DIR/suggest-missing-await.rs:69:9
147 LL | match dummy_result() {
148 | -------------- this expression has type `impl Future<Output = Result<(), ()>>`
151 | ^^^^^^ expected opaque type, found enum `Result`
153 note: while checking the return type of the `async fn`
154 --> $DIR/suggest-missing-await.rs:57:28
156 LL | async fn dummy_result() -> Result<(), ()> {
157 | ^^^^^^^^^^^^^^ checked the `Output` of this `async fn`, expected opaque type
158 = note: expected opaque type `impl Future<Output = Result<(), ()>>`
159 found enum `Result<_, _>`
160 help: consider `await`ing on the `Future`
162 LL | match dummy_result().await {
165 error: aborting due to 7 previous errors
167 For more information about this error, try `rustc --explain E0308`.