-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
Problem with type inference #4124
Comments
As written, your thunk evaluates the value of
Let us know if that solves the problem! |
Oh wow, I didn't realize there was such a huge difference between using or not using a semi-colon. I've now moved on to new issues with this program related to copying non-copyable values. Thanks! |
Yeah, it's a common source of confusion: the meaning of the semicolon is always "Take this expression and turn it into a new statement, with result type |
This is a backport of rust-lang#4124. Fixes rust-lang#4109
I wrote up a simple, naive implementation of thunks in Rust but I've been having trouble compiling a test example, inference is unifying to () and I'm not able to fill in a type parameter to override this.
It's a small example so I threw it in a gist.
https://gist.github.com/4221872
This is with rustc 0.4
Thanks!
The text was updated successfully, but these errors were encountered: