]> git.lizzy.rs Git - rust.git/blob - tests/ui/typeck/issue-90027-async-fn-return-suggestion.stderr
Rollup merge of #107706 - tgross35:atomic-as-mut-ptr, r=m-ou-se
[rust.git] / tests / ui / typeck / issue-90027-async-fn-return-suggestion.stderr
1 error[E0308]: mismatched types
2   --> $DIR/issue-90027-async-fn-return-suggestion.rs:4:5
3    |
4 LL | async fn hello() {
5    |                  - help: try adding a return type: `-> i32`
6 LL |     0
7    |     ^ expected `()`, found integer
8
9 error[E0308]: mismatched types
10   --> $DIR/issue-90027-async-fn-return-suggestion.rs:9:5
11    |
12 LL | async fn world() -> () {
13    |                     -- expected `()` because of return type
14 LL |     0
15    |     ^ expected `()`, found integer
16
17 error[E0308]: mismatched types
18   --> $DIR/issue-90027-async-fn-return-suggestion.rs:14:5
19    |
20 LL |     hello()
21    |     ^^^^^^^ expected `()`, found opaque type
22    |
23    = note: expected unit type `()`
24             found opaque type `impl Future<Output = ()>`
25 help: consider `await`ing on the `Future`
26    |
27 LL |     hello().await
28    |            ++++++
29 help: consider using a semicolon here
30    |
31 LL |     hello();
32    |            +
33
34 error: aborting due to 3 previous errors
35
36 For more information about this error, try `rustc --explain E0308`.