Skip to content

disable multiple-match slice patterns #32161

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
wants to merge 1 commit into from

Conversation

arielb1
Copy link
Contributor

@arielb1 arielb1 commented Mar 9, 2016

Like [a, ..b]. These are typed in a very odd way, which causes some issues for
MIR translation.

Slice patterns with ignore patterns, e.g. [a, .., b], are allowed (but still
gated under advanced_slice_patterns).

r? @eddyb

Like [a, ..b]. These are typed in a very odd way, which causes some issues for
MIR translation.

Slice patterns with ignore patterns, e.g. [a, .., b], are allowed (but still
gated under `advanced_slice_patterns`).
@eddyb
Copy link
Member

eddyb commented Mar 9, 2016

But I just fixed them in #31710... Although I would say that slicing should be an lvalue not an rvalue (maybe even checked like a downcast).

@arielb1
Copy link
Contributor Author

arielb1 commented Mar 9, 2016

It should be an lvalue, which would require the parts doing the matching to be rewritten anyway.

@eddyb
Copy link
Member

eddyb commented Mar 9, 2016

@arielb1 I would rather change the patterns directly to the accepted RFC 495 (see #23121), but I don't think it's worth messing with old trans, unless you want to get the semantics out and have a chance at stabilizing it.

@arielb1
Copy link
Contributor Author

arielb1 commented Mar 9, 2016

I will go for stabilize-by-MIR.

@arielb1 arielb1 closed this Mar 9, 2016
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants