fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #69854 - pietroalbini:stable-next, r=Centrilb8cedc00407

1.42.0
1.0 KiB38 linesraw
1error[E0308]: mismatched types
2  --> $DIR/suggest-missing-await.rs:13:14
3   |
4LL | async fn make_u32() -> u32 {
5   |                        --- the `Output` of this `async fn`'s found opaque type
6...
7LL |     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
16error[E0308]: mismatched types
17  --> $DIR/suggest-missing-await.rs:23:5
18   |
19LL | async fn dummy() {}
20   |                  - the `Output` of this `async fn`'s found opaque type
21...
22LL |     dummy()
23   |     ^^^^^^^ expected `()`, found opaque type
24   |
25   = note: expected unit type `()`
26            found opaque type `impl std::future::Future`
27help: try adding a semicolon
28   |
29LL |     dummy();
30   |            ^
31help: consider using `.await` here
32   |
33LL |     dummy().await
34   |
35
36error: aborting due to 2 previous errors
37
38For more information about this error, try `rustc --explain E0308`.