-
Notifications
You must be signed in to change notification settings - Fork 13.3k
librustc: Parse, but do not fully turn on, the ref
keyword for
#15929
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
Conversation
I updated the PR message to point at #12831, feel free to update the commit message to point there as well (if you feel so inclined), but it's certainly ok regardless! |
so @aturon and I were talking and we were thinking that it is plausible that we could completely infer, on a variable by variable basis, both:
In this case, we could do away entirely with the The idea is basically to make use of the same information we use today to decide what kind of borrow is needed. Basically after typeck (during regionck) we walk how each upvar is used. We can then say that every upvar which is either |
(That's just an FYI, I'll try to write up something more detailed and mail it out) |
Removing the r+ for now, @aturon recommended on IRC that we may want to hold off until we discuss this (not having |
Disagree. This RFC is approved, and therefore it should land. I do not want to hold off a critical piece of unboxed closures over a vague notion that we can do better. There are many things we will have to freeze in a suboptimal state to meet our 1.0 deadline. If we can't even land approved RFCs because of vague notions that we could do something better, we have a serious problem. |
This can be approved to allow us to get some working form of unboxed closures, and then be removed and replaced with inference in future if we decide to go that route before 1.0. |
Agreed. Even with inference I think me may want a |
Ok, it's pretty squirreled away that we can at least land this part. One thing I forgot, can you add a test or two just to exercise some of this functionality? Other than that r=me |
On Wed, Jul 23, 2014 at 04:35:33PM -0700, Patrick Walton wrote:
Just to be clear, I specifically didn't say anything in my comment |
This was my fault -- I just thought we might want to chat about it before driving ahead with the changes. But I think @pcwalton is right. Mea culpa. |
by-reference upvars. This partially implements RFC 38. A snapshot will be needed to turn this on, because stage0 cannot yet parse the keyword. Part of rust-lang#12381.
by-reference upvars. This partially implements RFC 38. A snapshot will be needed to turn this on, because stage0 cannot yet parse the keyword. Part of #12831. r? @alexcrichton
by-reference upvars.
This partially implements RFC 38. A snapshot will be needed to turn this
on, because stage0 cannot yet parse the keyword.
Part of #12831.
r? @alexcrichton