Code
async fn number() -> i32 {
42
}
fn wrapped_number() -> i32 {
number()
}
Current output
error[E0308]: mismatched types
--> src/lib.rs:6:5
|
5 | fn wrapped_number() -> i32 {
| --- expected `i32` because of return type
6 | number()
| ^^^^^^^^ expected `i32`, found future
Desired output
error[E0308]: mismatched types
--> src/lib.rs:6:5
|
5 | fn wrapped_number() -> i32 {
| --- expected `i32` because of return type
6 | number()
| ^^^^^^^^ expected `i32`, found future
help: consider making the function `async`
|
5 | async fn wrapped_number() -> i32 {
| +++++
help: if you make the function `async`, you can `await` on the future
6 | number().await
| ++++++
Rationale and extra context
No response
Other cases
Rust Version
Anything else?
No response
Code
Current output
Desired output
Rationale and extra context
No response
Other cases
Rust Version
Anything else?
No response