Skip to content

Update to rust master #130

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

Merged
merged 1 commit into from
Dec 23, 2014
Merged

Update to rust master #130

merged 1 commit into from
Dec 23, 2014

Conversation

alexcrichton
Copy link
Collaborator

No description provided.

@sfackler
Copy link
Owner

What was the need for all of the manual casting?

sfackler added a commit that referenced this pull request Dec 23, 2014
@sfackler sfackler merged commit b136cf6 into sfackler:master Dec 23, 2014
@alexcrichton alexcrichton deleted the update branch December 23, 2014 17:08
@alexcrichton
Copy link
Collaborator Author

Introduced in rust-lang/rust#19891, all functions now have anonymous types and they can be cast to a function pointer type. I believe this is to allow the optimization for the type of a function to have 0 size in the future (for unboxed closures primarily I believe).

@sfackler
Copy link
Owner

Interesting. I had assumed that there would be automatic coercion there.

@alexcrichton
Copy link
Collaborator Author

Typically there is, but sadly it doesn't happen through an Option right now. Because each of these was Some(some_function) the expression had the type Option<F> where you can't name F, and manual coercions had to be added.

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