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

Permit the || syntax to be used for both boxed and unboxed closures #19113

Merged
merged 4 commits into from
Nov 20, 2014

Conversation

nikomatsakis
Copy link
Contributor

Use the expected type to infer the argument/return types of unboxed closures. Also, in || expressions, use the expected type to decide if the result should be a boxed or unboxed closure (and if an unboxed closure, what kind).

This supercedes PR #19089, which was already reviewed by @pcwalton.

@nikomatsakis
Copy link
Contributor Author

Giving this high priority because of the importance of unboxed closures for 1.0.

bors added a commit that referenced this pull request Nov 20, 2014
…ation, r=acrichto

Use the expected type to infer the argument/return types of unboxed closures. Also, in `||` expressions, use the expected type to decide if the result should be a boxed or unboxed closure (and if an unboxed closure, what kind).

This supercedes PR #19089, which was already reviewed by @pcwalton.
@bors bors closed this Nov 20, 2014
@bors bors merged commit b9c5cd4 into rust-lang:master Nov 20, 2014
@nikomatsakis nikomatsakis deleted the unboxed-boxed-closure-unification branch March 30, 2016 16:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants