rust-lang / rust-lang/rust-clippy

`iter_over_hash_type` should lint `hashbrown` types and/or be configurable

Open
#16,408 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

C-enhancement I-false-negative
Dominant language
Rust
Stars
13.5k
Forks
2.2k
Avg merge
2d 10h
Merged PRs (30d)
32

Description

Currently iter_over_hash_type only detects iteration on hashmap-like types from standard library. However, it is not uncommon to have different implementation of them, for example using hashbrown directly, rather than through std. Ideally there would be ways to detect those as well.

I think the two possible solutions are:

  1. Detect specifically hashbrown types
  2. Have a configuration option to configure which types iter_over_hash_type should lint against

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the implementation and tests for the iter_over_hash_type lint. Compare the two proposed directions—recognizing hashbrown types or adding configurable types—and determine which behavior the existing lint tests should cover. Done means the lint handles the agreed type set or configuration and its tests verify that behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.