rust-lang / rust-lang/rust-clippy
Make `SINGLE_CHAR_PATTERN` check for bounds, not `self` type
Open
Nobody has claimed this yet.
C-enhancement
E-hard
- Dominant language
- Rust
- Stars
- 13.5k
- Forks
- 2.2k
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 32
Description
See #830 & #867.
It’d be better to check that the argument is Pattern instead of self is &str in SINGLE_CHAR_PATTERN.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the referenced issues #830 and #867, then locate SINGLE_CHAR_PATTERN in the Clippy source. Confirm where its current self-type check is implemented and update the check so it tests whether the argument is Pattern rather than whether self is &str; done means the relevant existing tests still pass.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- tooling
- Issue type
- Refactor
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100