rust-lang / rust-lang/rust-clippy
New style lint: Warn for non_camel_case_types of ty capture in macro_rules
Open
Nobody has claimed this yet.
A-lint
L-style
T-macros
- Dominant language
- Rust
- Stars
- 13.5k
- Forks
- 2.2k
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 32
Description
For example:
macro_rules! foo {
($int_ty:ty) => {
// ^^^^^^ help: convert the identifier to upper camel case: `IntTy`
<$int_ty>::max_value()
};
}
const BAR: u32 = foo!(u32);
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 reproducing the issue's macro_rules example and confirm that the ty capture is not warned about by the non_camel_case_types lint. Trace how this lint handles identifiers in macro definitions, then make the example produce the suggested IntTy warning and verify the resulting lint behavior with the relevant tests.
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
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100