Skip to content
This repository has been archived by the owner on Apr 5, 2024. It is now read-only.

Propose more relaxtions to closure catpures #16

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

arora-aman
Copy link
Member

@arora-aman arora-aman commented Jul 31, 2020

Conceptually this is a result of capturing based on the use of variables from the enclosing environment of the closure instead of based on variables that appear within the closure.

Breif details about implementation:

Rendered

cc: @rust-lang/wg-rfc-2229

Breif details about implementation:
- Instead of pre-initializing `closure_captured` and `upvars_capture_map` using `upvars_mentioned` we will be rely on use within the closure. This will be handled as part of #7 
- For coercing a closure to FnPtr, instead of relying on `upvars_mentioned` in typechk we will accept such code in typechk while setting a no-capture obligation that will be validated in trait selection post capture analysis.
@arora-aman
Copy link
Member Author

Once this is accepted here, we probably want to open an issue on rust-lang/rust as well

@arora-aman arora-aman changed the title Propose language changes Propose more relaxtions to closure catpures Aug 31, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant