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
Implement slicing syntax. #17318
Implement slicing syntax. #17318
Conversation
| unsafe { | ||
| assert!(COUNT == 8); | ||
| } | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
New line needed
|
Can you add a run-fail test or two to make sure that cleanups run if failure happens during evaluation of a slice argument (for example, that the temporary generated by the LHS of |
|
Otherwise looks good, will rereview with those changes. Awesome work |
|
@pcwalton re-r? I wasn't exactly sure what cleanup tests to add - does the one I added do what you want? And are there more things we should test? |
|
@nick29581 I think @pcwalton meant |
`expr[]`, `expr[expr..]`, `expr[..expr]`,`expr[expr..expr]` Uses the Slice and SliceMut traits. Allows ... as well as .. in range patterns.
expr[],expr[expr..],expr[..expr],expr[expr..expr]Uses the Slice and SliceMut traits.
Allows ... as well as .. in range patterns.
r? @pcwalton (or anyone else)
closes #17177