rust-lang / rust-lang/rust-clippy
A 'close' annotation to restrict the bindings accessible by a block
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 13.5k
- Forks
- 2.2k
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 32
Description
cc https://github.com/rust-lang/rfcs/issues/2496 (@bpsuntrup @oli-obk @burdges)
It would be nice to have a way to just restrict the bindings accessible by a block of code, kinda like one of the early planned features of JAI. @oli-obk suggested this could be done as a clippy lint, which sounds neat.
I'm opening this issue so we can bikeshed the syntax, discuss limitations, and possibly implement it (or to give people a chance to object to it being implemented in clippy).
Scattered thoughts/discussion starters in the next comment.
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 linked RFC issue 2496 and the discussion in this issue, including the JAI example. Clarify the proposed syntax, limitations, and whether a Clippy lint is viable; done would require a settled design and an agreed implementation direction.
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
- 20/100