Closed
Description
A cousin to #17967.
The relevant bit of the docs is here: http://doc.rust-lang.org/book/compound-data-types.html#enums
The problem with this is that it's showing off the ability to compare enum variants with ==
, which, aside from being something that almost never happens in practice, continually confounds users who expect it to automatically work on enums that they define themselves. That this section of the guide has been a stumbling block for so long (#17675, #18155) should be throwing up red flags by now.
If nothing else, it needs to contain a footnote/link/code comment giving some hint as to PartialEq's existence. If that would be out-of-scope for this chapter, then the section needs to be revised to eliminate the usage of ==
.
Metadata
Metadata
Assignees
Labels
No labels