Provide more helpful error message when trying to use const generic defaults #80507
Labels
A-const-generics
Area: const generics (parameters and arguments)
A-diagnostics
Area: Messages for errors, warnings, and lints
A-parser
Area: The parsing of Rust source code to an AST
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
const-generics-bad-diagnostics
An error is correctly emitted, but is confusing, for `min_const_generics`.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Defaults are currently not implemented in const generics. With
min_const_generics
stabilising soon, I've been using them more and one thing that is surprising is the lack of defaults. Especially when you try to declare a default, the error message provides a unexpected syntax error, when I would expect a "defaults in const generics is not implemented" error, leading you to think that there's another syntax that you need to use as opposed to it just not being available.Error Message
The text was updated successfully, but these errors were encountered: