Given the following code:
func foo() -> i32 {
123
}
function foo() -> i32 {
123
}
The current output is:
Compiling playground v0.0.1 (/playground)
error: expected one of `!` or `::`, found `foo`
--> src/main.rs:1:6
|
1 | func foo() -> i32 {
| ^^^ expected one of `!` or `::`
error: could not compile `playground` due to previous error
Ideally the error message should suggest replacing func or function with fn.
Given the following code:
The current output is:
Ideally the error message should suggest replacing
funcorfunctionwithfn.