-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
lint on manual Hash
, *Ord
, *Eq
impls that access a *Cell
#732
Labels
A-lint
Area: New lints
E-medium
Call for participation: Medium difficulty level problem and requires some initial experience.
L-correctness
Lint: Belongs in the correctness lint group
T-middle
Type: Probably requires verifiying types
Comments
we should also warn on |
I think that people might want those impls anyway. Especially Ord and Eq might be helpful for sorting or partitioning a collection (or a variety of other things) while having a |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-lint
Area: New lints
E-medium
Call for participation: Medium difficulty level problem and requires some initial experience.
L-correctness
Lint: Belongs in the correctness lint group
T-middle
Type: Probably requires verifiying types
even read-only access can be bad, because between two calls to
hash
, the cell might have changed its value, even if there are only immutable references present.cc #729
should be fairly straight forward.
bonus points for also checking inherent methods that are called in the impl method for interior mutation.
The text was updated successfully, but these errors were encountered: