Missing documentation of `use` bounds
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 119k
- Forks
- 16.1k
- PR merge metrics
- PR metrics pending
Description
Location
Concerns rustc --explain E0700, the Rust Book, and the Reference.
Summary
I originally asked this StackOverflow question and was advised to file a bug.
The new use keyword, apparently introduced in 1.82, is poorly documented. There are at least 3 documentation issues:
- The rust error E0700 tells you to
add aBut running this command only talks about the older syntax and doesn't mentionuse<...>bound to explicitly capture'_... For more information about this error, tryrustc --explain E0700.useat all. - The Rust Book doesn't mention this syntax at all, in stable or nightly, as far as I can tell.
- The Reference nightly edition mentions it in 10.1.16 and 10.6, but neither of these sections are included in the stable edition.
My specific questions about the syntax were answered by the announcement blog post, I just didn't know how to find it, because "rust use lifetime" is a pretty terrible set of keywords to google for.
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 rustc --explain E0700, then compare the Rust Book and the Reference sections on precise capturing and use bounds, including their stable and nightly versions. Review the linked announcement blog post for the intended syntax and scope. Done means the error explanation and relevant stable documentation consistently explain use bounds and point readers to the necessary details.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100