rust-lang / rust-lang/rust-clippy
unused_rust_features lint
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 13.5k
- Forks
- 2.2k
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 32
Description
What it does
(I am not sure if this is the right place to put this, perhaps it's better as a rustc warning).
I'd like a warning that tells me when on Nightly one (ore more than one) Rust feature isn't used.
Lint Name
unused_rust_features
Category
pedantic
Advantage
Cleaner and shorter code, less future churn, less complexity to expect in the code.
Drawbacks
It's pedantic because it doesn't make the code safer or faster. It could cause a bit more work right now to clean unused feature annotations. While writing code it could cause to comment out features temporarily and uncomment them out later if a feature is used again. But overall I prefer my Rust code to be cleaner.
Example
#![feature(array_chunks, box_syntax)]
fn main() {}
Currently this code gives no warnings. Both features could be removed.
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
The issue names no implementation files, tests, or entry points. Start by locating how rust-clippy defines lints and how Rust feature declarations are exposed to lint code; done should include a warning for unused nightly features in the provided example and coverage for the relevant cases.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100