Closed
Description
This is a tracking issue for precise capturing of type and lifetime parameters in impl Trait
opaque types.
The feature gate for the issue is #![feature(precise_capturing)]
.
About tracking issues
Tracking issues are used to record the overall progress of implementation. They are also used as hubs connecting to other relevant issues, e.g., bugs or open design questions. A tracking issue is however not meant for large scale discussion, questions, or bug reports about a feature. Instead, open a dedicated issue for the specific matter and add the relevant feature gate label.
Steps
- Implement.
- Write/accept an RFC.
- Implement migration lints.
- Remove
incomplete_features
lint fromuse<..>
syntax. - Add error for use of
use<..>
within RPITIT. - Resolve bikeshed on
impl use<..>
vsuse<..> impl
. - Switch to final chosen syntax.
- Implement formatting in
rustfmt
. - Stabilize
use<..>
syntax. - N/A: Add documentation to the dev guide.
- See the instructions.
- Add documentation to the reference.
- Add capturing and precise capturing rules reference#1577
- Be sure to update the name-resolution example in impl trait restrictions.
- Add documentation to the edition guide.
- Add formatting for new syntax to the style guide.
- Ensure ready for Rust 2024 stabilization.
Related
- Parse precise capturing syntax dtolnay/syn#1677
- Parse
use<'a, T>
precise capturing bounds as verbatim dtolnay/syn#1707 - Design meeting: Precise capturing lang-team#261
- Design meeting:
impl use<..> Trait
vsuse<..> impl Trait
lang-team#269 - Lifetime Capture Rules 2024 rfcs#3498
- Precise capturing rfcs#3617
- Stabilize associated type position impl Trait (ATPIT) #120700
- Syntax for precise capturing:
impl Trait + use<..>
#125836 - Deny
use<>
for RPITITs #126746 - Add nightly style guide section for
precise_capturing
use<>
syntax #126753 - Implement
use<>
formatting in rustfmt #126754 - Give RPITITs variances, so they can (not) capture lifetimes #124029
- rustdoc: support for precise capturing #127228
- Suggest using precise capturing for hidden type that captures region #127619
- Implement
precise_capturing
support for rustdoc #127632 - Add cross-crate precise capturing support to rustdoc #127658
- Fix precise capturing suggestion for hidden regions when we have APITs #127664
- Stabilize opaque type precise capturing (RFC 3617) #127672
- Support for
+ use<..>
precise_capturing
syntax rust-analyzer#17598 - feat: add preliminary support for
+ use<..>
precise_capturing
syntax rust-analyzer#17676
Implementation history
- Implement syntax for
impl Trait
to specify its captures explicitly (feature(precise_capturing)
) #123468 - Warn against changes in opaque lifetime captures in 2024 #124228
cc @oli-obk @compiler-errors @rust-lang/style
Metadata
Metadata
Assignees
Labels
Area: The 2024 editionBlocker: Approved by a merged RFC but not yet implemented.Category: An issue tracking the progress of sth. like the implementation of an RFC`#![feature(precise_capturing)]`Status: This issue is ready for inclusion in the edition.Relevant to the language team, which will review and decide on the PR/issue.