-
Notifications
You must be signed in to change notification settings - Fork 2k
Support for + use<..> precise_capturing syntax #17598
Copy link
Copy link
Closed
Labels
A-parserparser issuesparser issuesA-tytype system / type inference / traits / method resolutiontype system / type inference / traits / method resolutionC-featureCategory: feature requestCategory: feature requestE-easyE-has-instructionsIssue has some instructions and pointers to code to get startedIssue has some instructions and pointers to code to get started
Metadata
Metadata
Assignees
Labels
A-parserparser issuesparser issuesA-tytype system / type inference / traits / method resolutiontype system / type inference / traits / method resolutionC-featureCategory: feature requestCategory: feature requestE-easyE-has-instructionsIssue has some instructions and pointers to code to get startedIssue has some instructions and pointers to code to get started
Type
Fields
Give feedbackNo fields configured for issues without a type.
We're planning to stabilize
#![feature(precise_capturing)]ahead of Rust 2024 (in all editions). This feature allows one to write:Playground link
That is, it allows for the precise capturing of generic parameters in RPIT-like impl Trait opaque types (the initial stabilization will require all in scope type and const parameters to be included in the
use<..>bound; see the stabilization report for other restrictions). We need this to stabilize so that we can stabilize the Lifetime Capture Rules 2024 (RFC 3498) in Rust 2024. These are lang team priority items for the Rust 2024 edition.Currently r-a gives errors about this syntax:
The earliest this syntax could conceivably stabilize is with Rust 1.82, which will branch on 2024-08-30 and will be released on 2024-10-17.
Tracking:
precise_capturingsyntax rust#123432