]> git.proxmox.com Git - rustc.git/blob - src/test/ui/async-await/suggest-missing-await.stderr
New upstream version 1.49.0~beta.4+dfsg1
[rustc.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 | async fn make_u32() -> u32 {
5 | --- the `Output` of this `async fn`'s found opaque type
6 ...
7 LL | take_u32(x)
8 | ^ expected `u32`, found opaque type
9 |
10 = note: expected type `u32`
11 found opaque type `impl Future`
12 help: consider `await`ing on the `Future`
13 |
14 LL | take_u32(x.await)
15 | ^^^^^^
16
17 error[E0308]: mismatched types
18 --> $DIR/suggest-missing-await.rs:22:5
19 |
20 LL | async fn dummy() {}
21 | - the `Output` of this `async fn`'s found opaque type
22 ...
23 LL | dummy()
24 | ^^^^^^^ expected `()`, found opaque type
25 |
26 = note: expected unit type `()`
27 found opaque type `impl Future`
28 help: consider `await`ing on the `Future`
29 |
30 LL | dummy().await
31 | ^^^^^^
32 help: try adding a semicolon
33 |
34 LL | dummy();
35 | ^
36
37 error: aborting due to 2 previous errors
38
39 For more information about this error, try `rustc --explain E0308`.