Inaccurate error message for const operations in type parameters #79429
Labels
A-const-generics
Area: const generics (parameters and arguments)
A-diagnostics
Area: Messages for errors, warnings, and lints
C-bug
Category: This is a bug.
D-confusing
Diagnostics: Confusing error or lint that should be reworked.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Uh oh!
There was an error while loading. Please reload this page.
I tried this code:
This gave an error message:
But you can see in
X::LEN
that you can perform const operations usingS
, the restriction this hits is more subtle in that you cannot perform const operations using generic parameters when these will impact the type system (as I understand it, I may be wrong). This also comes up if a generic parameter is used in defining an associated type.The text was updated successfully, but these errors were encountered: