rust-lang / rust-lang/reference
Language in `Scope of function parameters` vs. `Drop scopes` could be improved
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 1.6k
- Forks
- 607
- PR merge metrics
- PR metrics pending
Description
Scopes of function parameters says
All function parameters are in the scope of the entire function body, [...]
Drop scopes directly above introduces the two - importantly distinct - outermost scopes:
- The entire function scope is the outer most scope.
- The function body block is contained within the scope of the entire function.
The avid reader might be confused about which of these two the language regarding function parameters is referring to:
- Does "the scope of the entire function body" refer to the outermost scope? Yet that paragraph says "the entire function", not "the entire function body".
- Alternatively, is "the scope of the entire function body" a reference to "The function body block"? Yet the second paragraph says "the function body block", not "function body".
The language wrt function parameters might be improved to ensure that readers understand which Drop Scope is being referred to.
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 with the “Scopes of function parameters” and “Drop scopes” sections in the Rust Reference, comparing their wording and the definitions of the two outermost scopes. Revise the function-parameter language so it clearly identifies the intended scope, then check that it no longer conflicts with the surrounding drop-scope terminology.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100