Improve error for missing braces in const block #78168
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
A-parser
Area: The lexing & parsing of Rust source code to an AST
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
D-confusing
Diagnostics: Confusing error or lint that should be reworked.
F-inline_const
Inline constants (aka: const blocks, const expressions, anonymous constants)
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Someone may try to write code like this (playground):
Yet this produces these misleading errors:
Another example (playground):
Error:
The text was updated successfully, but these errors were encountered: