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 - [x] Implement. - https://github.com/rust-lang/rust/pull/123468 - [x] Write/accept an RFC. - https://github.com/rust-lang/rfcs/pull/3617 - [x] Implement migration lints. - https://github.com/rust-lang/rust/pull/124228 - [x] Remove `incomplete_features` lint from `use<..>` syntax. - [x] Add error for use of `use<..>` within RPITIT. - https://github.com/rust-lang/rust/pull/126746 - [x] Resolve bikeshed on `impl use<..>` vs `use<..> impl`. - https://github.com/rust-lang/rust/issues/125836 - [x] Switch to final chosen syntax. - https://github.com/rust-lang/rust/pull/126049 - [x] Implement formatting in `rustfmt`. - https://github.com/rust-lang/rust/pull/126754 - [x] Stabilize `use<..>` syntax. - https://github.com/rust-lang/rust/pull/127672 - N/A: Add documentation to the [dev guide][]. - See the [instructions][doc-guide]. - [x] Add documentation to the [reference][]. - https://github.com/rust-lang/reference/pull/1577 - [x] Be sure to update the name-resolution example in [impl trait restrictions](https://github.com/rust-lang/reference/blob/b1d10606478677491effea5880ca80d97fccca4c/src/names/scopes.md#impl-trait-restrictions). - [x] Add documentation to the [edition guide][]. - https://github.com/rust-lang/edition-guide/pull/316 - [x] Add formatting for new syntax to the [style guide][]. - https://github.com/rust-lang/rust/pull/126753 - [x] Ensure ready for Rust 2024 stabilization. [dev guide]: https://github.com/rust-lang/rustc-dev-guide [doc-guide]: https://rustc-dev-guide.rust-lang.org/stabilization_guide.html#documentation-prs [edition guide]: https://github.com/rust-lang/edition-guide [nightly style procedure]: https://github.com/rust-lang/style-team/blob/master/nightly-style-procedure.md [reference]: https://github.com/rust-lang/reference [reference-instructions]: https://github.com/rust-lang/reference/blob/master/CONTRIBUTING.md [style guide]: https://github.com/rust-lang/rust/tree/master/src/doc/style-guide ### Related - https://github.com/dtolnay/syn/issues/1677 - https://github.com/dtolnay/syn/pull/1707 - https://github.com/rust-lang/lang-team/issues/261 - https://github.com/rust-lang/lang-team/issues/269 - https://github.com/rust-lang/rfcs/pull/3498 - https://github.com/rust-lang/rfcs/pull/3617 - https://github.com/rust-lang/rust/pull/120700 - https://github.com/rust-lang/rust/issues/125836 - https://github.com/rust-lang/rust/pull/126746 - https://github.com/rust-lang/rust/pull/126753 - https://github.com/rust-lang/rust/pull/126754 - https://github.com/rust-lang/rust/pull/124029 - https://github.com/rust-lang/rust/issues/127228 - https://github.com/rust-lang/rust/pull/127619 - https://github.com/rust-lang/rust/pull/127632 - https://github.com/rust-lang/rust/pull/127658 - https://github.com/rust-lang/rust/pull/127664 - https://github.com/rust-lang/rust/pull/127672 - https://github.com/rust-lang/rust-analyzer/issues/17598 - https://github.com/rust-lang/rust-analyzer/pull/17676 ### Implementation history - https://github.com/rust-lang/rust/pull/123468 - https://github.com/rust-lang/rust/pull/124228 cc @oli-obk @compiler-errors @rust-lang/style