Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tracking issue for RFC 3617 precise capturing of types #130043

Open
2 of 7 tasks
traviscross opened this issue Sep 6, 2024 · 2 comments
Open
2 of 7 tasks

Tracking issue for RFC 3617 precise capturing of types #130043

traviscross opened this issue Sep 6, 2024 · 2 comments
Labels
C-tracking-issue Category: An issue tracking the progress of sth. like the implementation of an RFC F-precise_capturing_of_types `#![feature(precise_capturing_of_types)]` F-precise_capturing `#![feature(precise_capturing)]` S-tracking-unimplemented Status: The feature has not been implemented. T-lang Relevant to the language team, which will review and decide on the PR/issue.

Comments

@traviscross
Copy link
Contributor

traviscross commented Sep 6, 2024

The feature gate for the issue is #![feature(precise_capturing_of_types)].

This tracking issue covers extending the precise_capturing feature to allow for the partial capturing of type and const generic parameters.

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

Unresolved Questions

TODO.

Related

TODO.

cc @compiler-errors

@traviscross traviscross added T-lang Relevant to the language team, which will review and decide on the PR/issue. C-tracking-issue Category: An issue tracking the progress of sth. like the implementation of an RFC F-precise_capturing `#![feature(precise_capturing)]` F-precise_capturing_of_types `#![feature(precise_capturing_of_types)]` labels Sep 6, 2024
@nikomatsakis
Copy link
Contributor

I had added an example in #130031 (which I closed in favor of this issue)

@workingjubilee
Copy link
Member

workingjubilee commented Sep 7, 2024

Because I thought I was seeing double for a moment, for future reference, these two issues are related for obvious reasons, but currently...

@fmease fmease added the S-tracking-unimplemented Status: The feature has not been implemented. label Dec 12, 2024
smalis-msft added a commit to microsoft/openvmm that referenced this issue Jan 14, 2025
…528)

The Rust 2024 edition will be changing how `impl Trait` in return
position functions. Namely it will be changing the rules from capturing
no lifetimes, to capturing all lifetimes. The reasons for this are
documented in [RFC
3498](https://github.com/rust-lang/rfcs/blob/master/text/3498-lifetime-capture-rules-2024.md)
and [the migration
guide](https://doc.rust-lang.org/nightly/edition-guide/rust-2024/rpit-lifetime-capture.html).
A new 'precise capturing' syntax has been added to allow cases that
don't need everything captured to scope down what they take. This PR
updates all such cases to use the new syntax.

Note that currently this new syntax requires all type parameters in
scope to be listed. This currently results in overcapturing of type
parameters. This will be relaxed in the future, and is tracked by [RFC
3617](rust-lang/rust#130043).

This PR also marks the edition_2024_expr_fragment_specifier lint as no
longer needing fixing, as I have completed an audit of all our macros
that it flagged and none of them need changing.

Part of #288
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-tracking-issue Category: An issue tracking the progress of sth. like the implementation of an RFC F-precise_capturing_of_types `#![feature(precise_capturing_of_types)]` F-precise_capturing `#![feature(precise_capturing)]` S-tracking-unimplemented Status: The feature has not been implemented. T-lang Relevant to the language team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

4 participants