Closed as not planned

Description
Given the following code:
function foo() {}
The current output is:
error: expected one of `!`, `.`, `::`, `;`, `?`, `{`, `}`, or an operator, found `foo`
--> src/main.rs:2:11
|
2 | function foo() {}
| ^^^ expected one of 8 possible tokens
Ideally the output should look like: help: you likely meant to define a function using the `fn` keyword instead
Rustc already does this to an extent, for eg. here
pub function foo() {}
error: visibility `pub` is not followed by an item
--> src/main.rs:2:1
|
2 | pub function foo() {}
| ^^^ the visibility
|
= help: you likely meant to define an item, e.g., `pub fn foo() {}`
However, using a similar implementation to #99903, this could become ideal.
@rustbot claim