Skip to content

Missing documentation of use bounds #132224

@CGamesPlay

Description

@CGamesPlay

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:

  1. The rust error E0700 tells you to add a use<...> bound to explicitly capture '_... For more information about this error, try rustc --explain E0700. But running this command only talks about the older syntax and doesn't mention use at all.
  2. The Rust Book doesn't mention this syntax at all, in stable or nightly, as far as I can tell.
  3. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-docsArea: Documentation for any part of the project, including the compiler, standard library, and toolsT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.T-libsRelevant to the library team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions