-
Notifications
You must be signed in to change notification settings - Fork 12.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
indirect_structural_match lint misfiring on enum variant unused in const item #62614
Comments
My current thinking is that maybe we should revert (part of) PR #62339.
|
This is a way to address the regression aspect of rust-lang#62614 in the short term without actually fixing the bug. (My thinking is that the bug that this lint detects has gone undetected for this long, it can wait a bit longer until I or someone else has a chance to put in a proper fix that accounts for rust-lang#62614.)
when/if PR #62623 lands, the stable-to-nightly regression aspect of this issue can be removed. |
…rect-structural-match-lint-to-allow, r=zackmdavis downgrade indirect_structural_match lint to allow This is a short-term band-aid for the regression aspect of rust-lang#62614.
(Spawned off of #62411 (comment))
Consider this code (play):
In stable and beta, it compiles without warning.
In nightly, it compiles with the following diagnostic warning (#62411):
This is probably not what we want for this lint: It is entirely reasonable for the user to assume that the structural_match check is based solely on the ADT's that one encounters when traversing the const expression itself, and one should ignore any unused enum variants that are only tangentially related to the const.
The text was updated successfully, but these errors were encountered: