-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsA-parserArea: The lexing & parsing of Rust source code to an ASTArea: The lexing & parsing of Rust source code to an ASTT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Description
Code
fn test::<T>() {}
Current output
error: missing parameters for function definition
--> src/lib.rs:1:8
|
1 | fn test::<T>() {}
| ^
|
help: add a parameter list
|
1 | fn test()::<T>() {}
| ++
error: expected one of `->`, `<`, `where`, or `{`, found `::`
--> src/lib.rs:1:8
|
1 | fn test::<T>() {}
| ^^ expected one of `->`, `<`, `where`, or `{`
error: could not compile `playground` (lib) due to 2 previous errors
Desired output
error: *TBD*
--> src/lib.rs:1:8
|
1 | fn test::<T>() {}
| ^
|
help: remove the double colons
|
1 | fn test<T>() {}
|
error: expected one of `->`, `<`, `where`, or `{`, found `::`
--> src/lib.rs:1:8
|
1 | fn test::<T>() {}
| ^^ expected one of `->`, `<`, `where`, or `{`
error: could not compile `playground` (lib) due to 2 previous errors
Rationale and extra context
No response
Other cases
No response
Rust Version
Playground nightly, I don't see a way to verbosely print this information.
1.83.0-nightly (2024-09-23 7042c269c)
Anything else?
No response
Metadata
Metadata
Assignees
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsA-parserArea: The lexing & parsing of Rust source code to an ASTArea: The lexing & parsing of Rust source code to an ASTT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.