Better Diagnostics When Using Wrong Brackets to Create an Array #87672
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
D-newcomer-roadblock
Diagnostics: Confusing error or lint; hard to understand for new users.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
I ended up spending way too much time debugging the following error, since I was trying to port some C code to rust.
Give the error:
The error message is very vague and hard to determine the actual error here.
Seeing as though some programming languages like Java and C use
{}
for arrays, I think it'd make sense for the compiler to suggest using[]
if the user is trying to create an array.The text was updated successfully, but these errors were encountered: