-
-
Notifications
You must be signed in to change notification settings - Fork 14.2k
Closed
Labels
A-docsArea: Documentation for any part of the project, including the compiler, standard library, and toolsArea: Documentation for any part of the project, including the compiler, standard library, and tools
Description
Location
Summary
The introduction says that this error is about using an associated const in a pattern, and a user encountered it in that context. However, every paragraph after the erroneous code example talks about why you can't match a static, not why you can't match an associated const.
This seems like it might have been accidentally copied without edits from some other error, but there is no other copy of that text. (Was E0158 repurposed, perhaps?)
Proposed improvement
- E0158 should explain why associated consts may not be matched, and
- The text discussing
staticshould be moved to E0530, which is the code actually produced by trying to use astaticin a pattern, and which currently has only erroneous code samples and not an explanation of why.
Metadata
Metadata
Assignees
Labels
A-docsArea: Documentation for any part of the project, including the compiler, standard library, and toolsArea: Documentation for any part of the project, including the compiler, standard library, and tools