rust-lang / rust-lang/reference
Section on temporary order unclear
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 1.6k
- Forks
- 607
- PR merge metrics
- PR metrics pending
Description
Apart from lifetime extension, the temporary scope of an expression is the smallest scope that contains the expression and is for one of the following:
- The entire function body.
- A statement.
- The body of a
if,whileorloopexpression.
...
https://doc.rust-lang.org/reference/destructors.html#temporary-scopes
I'm ... not really sure what "is for one of the following" means here? I can make an educated guess, but this section reads really weirdly. Perhaps it could be clarified?
cc @eddyb @oli-obk you probably know what this should say at a technical level
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 linked Rust Reference section on temporary scopes, especially the quoted definition and its surrounding examples. Check the intended meaning of “is for one of the following” with the referenced maintainers or related discussion, then revise the wording so the scope rule is unambiguous and the section clearly communicates the intended cases.
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
- Needs clarification
- Newbie friendliness
- 35/100