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