E0158 explanation refers to statics, when it should be talking about associated consts #105585
Labels
A-docs
Area: documentation for any part of the project, including the compiler, standard library, and tools
Location
https://doc.rust-lang.org/nightly/error_codes/E0158.html
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 astatic
, not why you can't match an associatedconst
.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
static
should be moved to E0530, which is the code actually produced by trying to use astatic
in a pattern, and which currently has only erroneous code samples and not an explanation of why.The text was updated successfully, but these errors were encountered: