rust-lang / rust-lang/rust-clippy

Name enhancement `erasion_op` => `absorbing_op`

Open
#7,211 3 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

S-needs-discussion
Dominant language
Rust
Stars
13.5k
Forks
2.2k
Avg merge
2d 10h
Merged PRs (30d)
32

Description

There is the identity_op lint that fires on operations as 1*x

The name identity correspond to the accepted term, see Wikipedia/identity element.

There is the erasing_op lint that fires on operations as 0*x
But the term erasing is vague, e.g.: could it mean type erasure??
There is a precise word for that too: 0 is an absorbing element: see Wikipedia/absorbing element

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

Locate the existing erasing_op lint and all references to its name; the issue proposes renaming it to absorbing_op. Check the lint's documentation and tests if present, then confirm the new name is used consistently without changing which 0*x operations it reports.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
tooling
Issue type
Refactor
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.