-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Add support for destructuring vectors in match expressions #4143
Conversation
This is a very nice looking patch. |
Since this was written, the default binding mode changed from the old implicit by-ref to |
I'll merge this presently, just wanted to check .. this is substantial enough that we should probably have a contributor agreement. Have you filled one of those out? |
@graydon No, I have not... Is this the one you have in mind: http://www.mozilla.org/hacking/committer/? I'll take a look. |
@graydon I submitted the agreement via e-mail today. |
I rebased and made some more changes to make the exhaustiveness/reachability checks cleaner. The lifetime problems with destructured tails are clearly an oversight on my part, I hadn't looked into the memory categorization pass at all. |
Excellent. Contributor forms received, landed this in 6c83fe4 , thanks so much! |
Rework use_self impl based on ty::Ty comparison rust-lang#3410 | Take 2 This builds on top of rust-lang#5531 I already reviewed and approved the commits by `@montrivo.` So only the review of my commits should be necessary. I would also appreciate your review `@montrivo,` since you are familiar with the challenges here. Fixes rust-lang#3410 and Fixes rust-lang#4143 (same problem) Fixes rust-lang#2843 Fixes rust-lang#3859 Fixes rust-lang#4734 and fixes rust-lang#6221 Fixes rust-lang#4305 Fixes rust-lang#5078 (even at expression level now 🎉) Fixes rust-lang#3881 and Fixes rust-lang#4887 (same problem) Fixes rust-lang#3909 Not yet: rust-lang#4140 (test added) All the credit for the fixes goes to `@montrivo.` I only refactored and copy and pasted his code. changelog: rewrite [`use_self`] lint and fix multiple (8) FPs. One to go.
Resubmitting #4091 as I cannot seem to be able to change the target branch in the original PR. I squashed the commits as there isn't much of a logical separation possible and some of them were in half-broken state.
It'd be great if we could get this in for 0.5 if it's not too late. I'm stil considering @erickt's [a, ..b, c] proposal and wonder what other people think? As we're rejecting that syntax now, we can still be forward compatible with just the [a, ..tail] variant, though, so this could be added later on.