]> git.lizzy.rs Git - rust.git/blob - src/test/ui/async-await/suggest-missing-await.stderr
Rollup merge of #87759 - m-ou-se:linux-process-sealed, r=jyn514
[rust.git] / src / test / ui / async-await / suggest-missing-await.stderr
1 error[E0308]: mismatched types
2   --> $DIR/suggest-missing-await.rs:12:14
3    |
4 LL |     take_u32(x)
5    |              ^ expected `u32`, found opaque type
6    |
7 note: while checking the return type of the `async fn`
8   --> $DIR/suggest-missing-await.rs:5:24
9    |
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`
14 help: consider `await`ing on the `Future`
15    |
16 LL |     take_u32(x.await)
17    |               ^^^^^^
18
19 error[E0308]: mismatched types
20   --> $DIR/suggest-missing-await.rs:22:5
21    |
22 LL |     dummy()
23    |     ^^^^^^^ expected `()`, found opaque type
24    |
25 note: while checking the return type of the `async fn`
26   --> $DIR/suggest-missing-await.rs:18:18
27    |
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`
32 help: consider `await`ing on the `Future`
33    |
34 LL |     dummy().await
35    |            ^^^^^^
36 help: consider using a semicolon here
37    |
38 LL |     dummy();
39    |            ^
40
41 error: aborting due to 2 previous errors
42
43 For more information about this error, try `rustc --explain E0308`.