consider removing `allow(unused_mut)` from core and std doctests
Open
Nobody has claimed this yet.
A-docs
T-libs
- Dominant language
- Rust
- Stars
- 119k
- Forks
- 16.1k
- PR merge metrics
- PR metrics pending
Description
A lot of new rust users get confused about the relationship between mut bindings and &mut, and the doctests don't really help with this, with core alone having 21 doctests emitting this lint. most of these are mut bindings that hold a mutable reference.
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
Search the core and std doctests for allow(unused_mut), then inspect the affected examples and their lint output. Done means unnecessary allowances are removed, the doctests still compile, and the examples better clarify the distinction between mut bindings and &mut references.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- compilers
- Issue type
- Documentation
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100