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

Support moving values into closures and async blocks (fixes #150) #152

Merged
merged 1 commit into from
Oct 12, 2020

Conversation

udoprog
Copy link
Collaborator

@udoprog udoprog commented Oct 12, 2020

Also a minor patch to the Spanned derive, which calculated the wrong span for fields which have all optional fields except the last one.

This adds syntactical moving. So values used in the closure will be "moved" out of the scope. Even if they are copy (because there's no way to tell). This might be disable, because we also have a runtime check for moved values (which are actually moved).

image

@udoprog udoprog added the enhancement New feature or request label Oct 12, 2020
@udoprog udoprog merged commit dff50d0 into master Oct 12, 2020
@udoprog udoprog deleted the moving-values branch October 12, 2020 02:49
@udoprog udoprog added the changelog Issue has been added to the changelog label Oct 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog Issue has been added to the changelog enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant