Conversation
src/compiletest/header.rs
Outdated
There was a problem hiding this comment.
Are we still considering the syntax sugar from @thestinger's RFC to potentially make this less horrifying?
There was a problem hiding this comment.
Or perhaps I'm misunderstanding, is this only a temporary affair until |&mut: foo| is implemented?
There was a problem hiding this comment.
It's not temporary, it's just how you need to capture by-reference and by-mutable-reference when there's not already a reference. This is the case the sugar would improve, but it doesn't appear to be very common.
|
This is getting pretty close. Needs a rebase and some tests. |
|
OK, this is ready for initial review. There are several known problems, but I figured as this patch is over 1KLOC already it's best to fix them in followups. Known issues:
This patch includes simple unit tests for direct calls, calls through a generic type parameter, and boxed calls. r? @nikomatsakis (or whoever) |
|
(drive by comment) Would it be easy to put this all behind a feature gate until the feature is ready for prime-time? |
|
This is now behind a gate. Also fixed the formatting issues. |
src/llvm
Outdated
|
Started reading this today. Looks pretty nice! Not finished yet. |
There was a problem hiding this comment.
change this to assert that z has the correct value
There was a problem hiding this comment.
this comment seems like it was not addressed.
|
OK, left a few comments on things that need addressing. |
the leading quote part of the identifier for the purposes of hygiene. This adopts @jbclements' solution to rust-lang#14539. I'm not sure if this is a breaking change or not. Closes rust-lang#12512. [breaking-change]
the leading quote part of the identifier for the purposes of hygiene. This adopts @jbclements' solution to rust-lang#14539. I'm not sure if this is a breaking change or not. Closes rust-lang#12512. [breaking-change]
|
ping @pcwalton, what's the status of this? |
|
It's in my queue of P-backcompat-lang things to do. |
|
Current status: I have rebased the patch and addressed about half of @nikomatsakis' comments. However, this collided badly with the other unboxed closures work, necessitating some extra functionality. Specifically, I need to add tupling and untupling machinery in several places in trans in order to keep the tests passing, as they call the traits by name and implement them manually. I think that, semantically, @eddyb had the right idea all along: exposing the tupling/untupling is pretty messy, as is the @eddyb, you are perfectly within your rights to say "I told you so". :) |
|
Hmm. It's possible @eddyb's solution of having variadic generics seems preferable to a family of unnamable traits. That is, it'd be a generic and reusable mechanism. Certainly worth talking through in more detail. |
|
Getting closer here. One test failing. I had to rework most of the way unboxed closures work in the previous PRs. Still need to address one major issue in method resolution. |
|
Tests oughta' be passing now. |
|
This should be ready now; all of @nikomatsakis' comments addressed. r? @pnkfelix |
|
Tidy failures: https://travis-ci.org/rust-lang/rust/jobs/30130629 |
|
fixed tidy failures. |
There was a problem hiding this comment.
why did you add these bits of code in comments? e.g. was it to make it easier to convert the test into something that uses #[no_std] (so that you could feed it into a stage1 rustc) ? I would still be inclined to remove them...
There was a problem hiding this comment.
Sorry about that, I forgot to remove it.
|
@pcwalton LGTM, though my knowledge of trans is still pretty weak. I will try to at least give it a whirl locally, but I suspect that if you address the minor comments above, then it will be good to go. |
|
re-r? @pnkfelix |
|
Comments addressed. |
|
Rebased. |
r? @ghost changelog: none
@nikomatsakis r?