Description
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
.
Metadata
Metadata
Assignees
Labels
Area: Messages for errors, warnings, and lintsCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.Relevant to the compiler team, which will review and decide on the PR/issue.