rust-lang / rust-lang/rust

`confusable_idents` should respect per-item lint level configuration

Open
#118,656 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

A-lints C-enhancement C-feature-request L-confusable_idents T-compiler
Dominant language
Rust
Stars
119k
Forks
16.1k
PR merge metrics
PR metrics pending

Description

Trying to #[allow] this lint on a specific item is currently ignored and results in a warning

allow(confusable_idents) is ignored unless specified at crate level

Since the lint is generally helpful, I only want to disable it for specific modules (in this case, one that contains a lot of mathematical formulae transcribed using the original notation), but that doesn't actually seem to work.

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 reproducing the warning with #[allow(confusable_idents)] on a specific item, then trace the compiler's handling of the confusable_idents lint and its per-item lint levels. Done means the lint can be disabled for the targeted item or module while remaining enabled elsewhere, with coverage for both cases.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
compilers
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.