-
Notifications
You must be signed in to change notification settings - Fork 13k
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
Add Captures
marker trait
#56047
Add Captures
marker trait
#56047
Conversation
@rust-lang/libs I've done very little library work before, mainly working with the compiler. How do I add a feature gate for the library? Are feature-gate tests done in the same way as for compiler features? |
r? @TimNN (rust_highfive has picked a reviewer for you, use r? to override) |
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
I believe However, please add to both the doc-comment and the description of the tracking issue: what this API does, why it exists, an example of how it is used. You link to #34511 (comment) to justify the existence of this feature, but that is a comment in the middle of the tracking issue for Is this new API expected to be associated with language changes in how |
@SimonSapin I don't believe there are any plans to change the language semantics for RPIT lifetimes, but I could be wrong. This solution is ambivalent to such potential changes, as I see it. Regarding the tracking issue and doc comment: happy to add this once I can get a minimal working example. The doc comment already explains what it does, though the "why" and example do indeed need to be added. Will have a think about all this. I just wanted to get this issue formally out there in the open for now. @nikomatsakis @aturon Thoughts and opinions on any of the above would be welcome, given your comments about this on the aforementioned tracking issue. |
My opinion is that we should fix the language. I'm not entirely sure how to justify that yet though. It seems like you should be able to "hide" lifetimes that appear in the result but which are not relevant to the interface, just as you can do with a |
r? @aturon (or @nikomatsakis or @rust-lang/libs) |
@TimNN We've decide to take a separate approach to this. @eddyb left @nikomatsakis some suggestions on this on Discord, which he will be reviewing shortly, I think. :-) |
☔ The latest upstream changes (presumably #56578) made this pull request unmergeable. Please resolve the merge conflicts. |
@Dylan-DPC @eddyb had some ideas for @nikomatsakis about this (and making it a language feature). I think it's waiting for the two of them to talk before something can be done, I'm afraid. |
Implements #56046.