Skip to content

lint on manual Hash, *Ord, *Eq impls that access a *Cell #732

Closed
@oli-obk

Description

@oli-obk

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.

  1. Find impls of the above traits
  2. check if the type has fields that have interior mutability
  3. check if the impl-method has an ExprField for one of the interior mutability fields

bonus points for also checking inherent methods that are called in the impl method for interior mutation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-lintArea: New lintsE-mediumCall for participation: Medium difficulty level problem and requires some initial experience.L-correctnessLint: Belongs in the correctness lint groupT-middleType: Probably requires verifiying types

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions